Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Running an executable within a VBscript

Reply
 
Old 07-22-2008   #1 (permalink)
CLARK, GLENN B


 
 

Running an executable within a VBscript

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


My System SpecsSystem Spec
Old 07-22-2008   #2 (permalink)
PaulM


 
 

Re: Running an executable within a VBscript

Like this.

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


"CLARK, GLENN B" <GCLAKR@xxxxxx> wrote in message
news:uCZjGBD7IHA.4108@xxxxxx
Quote:

> 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
My System SpecsSystem Spec
Old 07-22-2008   #3 (permalink)
CLARK, GLENN B


 
 

Re: Running an executable within a VBscript

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


"PaulM" <paul@xxxxxx> wrote in message
news:elzgPID7IHA.1196@xxxxxx
Quote:

> Like this.
>
> WshShell.Run("filename /u /s")
>
>
> "CLARK, GLENN B" <GCLAKR@xxxxxx> wrote in message
> news:uCZjGBD7IHA.4108@xxxxxx
Quote:

>> 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
>
My System SpecsSystem Spec
Old 07-22-2008   #4 (permalink)
Tom Lavedas


 
 

Re: Running an executable within a VBscript

On Jul 22, 4:48 pm, "CLARK, GLENN B" <GCL...@xxxxxx> wrote:
Quote:

> How do I pass the parameters for /u and /s into that then.
>
> "PaulM" <p...@xxxxxx> wrote in message
>
> news:elzgPID7IHA.1196@xxxxxx
>
Quote:

> > Like this.
>
Quote:

> > WshShell.Run("filename /u /s")
>
Quote:

> > "CLARK, GLENN B" <GCL...@xxxxxx> wrote in message
> >news:uCZjGBD7IHA.4108@xxxxxx
Quote:

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

> >> 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.
>
Quote:
Quote:

> >> Any help would be greatly appreciated.
>
Quote:
Quote:

> >> 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/d...displaylang=en

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Calling Executable from VBScript VB Script
What is the executable associated with running VBScripts? VB Script
Running executable from Power Point Vista General
Running an executable - how? PowerShell
running an executable PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46