I am trying to run gpresults.exe from within a script with the folowing
parameters and I am new to working with VBScript.

First how do I do it and second how do I pass the parameters for the /s
option and /u option, these are the system and user id respectively.

Any help would be greatly appreciated.


GC

Re: Running an executable within a VBscript by PaulM

PaulM
Tue Jul 22 14:35:11 CDT 2008

Like this.

WshShell.Run("filename /u /s")


"CLARK, GLENN B" <GCLAKR@SCANA.COM> wrote in message
news:uCZjGBD7IHA.4108@TK2MSFTNGP04.phx.gbl...
> I am trying to run gpresults.exe from within a script with the folowing
> parameters and I am new to working with VBScript.
>
> First how do I do it and second how do I pass the parameters for the /s
> option and /u option, these are the system and user id respectively.
>
> Any help would be greatly appreciated.
>
>
> GC


Re: Running an executable within a VBscript by CLARK,

CLARK,
Tue Jul 22 15:48:52 CDT 2008

How do I pass the parameters for /u and /s into that then.


"PaulM" <paul@paulsxp.com> wrote in message
news:elzgPID7IHA.1196@TK2MSFTNGP05.phx.gbl...
> Like this.
>
> WshShell.Run("filename /u /s")
>
>
> "CLARK, GLENN B" <GCLAKR@SCANA.COM> wrote in message
> news:uCZjGBD7IHA.4108@TK2MSFTNGP04.phx.gbl...
>> I am trying to run gpresults.exe from within a script with the folowing
>> parameters and I am new to working with VBScript.
>>
>> First how do I do it and second how do I pass the parameters for the /s
>> option and /u option, these are the system and user id respectively.
>>
>> Any help would be greatly appreciated.
>>
>>
>> GC
>


Re: Running an executable within a VBscript by Tom

Tom
Tue Jul 22 16:00:47 CDT 2008

On Jul 22, 4:48 pm, "CLARK, GLENN B" <GCL...@SCANA.COM> wrote:
> How do I pass the parameters for /u and /s into that then.
>
> "PaulM" <p...@paulsxp.com> wrote in message
>
> news:elzgPID7IHA.1196@TK2MSFTNGP05.phx.gbl...
>
> > Like this.
>
> > WshShell.Run("filename /u /s")
>
> > "CLARK, GLENN B" <GCL...@SCANA.COM> wrote in message
> >news:uCZjGBD7IHA.4108@TK2MSFTNGP04.phx.gbl...
> >> I am trying to run gpresults.exe from within a script with the folowing
> >> parameters and I am new to working with VBScript.
>
> >> First how do I do it and second how do I pass the parameters for the /s
> >> option and /u option, these are the system and user id respectively.
>
> >> Any help would be greatly appreciated.
>
> >> GC

Do something like this ...

sSystem = "SomeName"
sUser = "SomeUserID"
set WshShell = createobject("Wscript.Shell")
WshShell.Run "filename /u " & sUser & " /s " & sSystem

Review the WSH documentation for Run for more details:

WSH 5.6 documentation download (URL all one line)
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/