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 - Trying to mimic "Start/Run" in Win 2000/XP?

Reply
 
Old 01-13-2009   #1 (permalink)
Ed from AZ


 
 

Trying to mimic "Start/Run" in Win 2000/XP?

I can input a line into Start / Run and it works fine. I'm trying to
put that into a script so I can automate it. Unfortunately, my
expertise (what little I have!) is VBA macros, not scripting.

What I have is:

Set WSHShell = CreateObject("WScript.Shell")
WSHShell.Run "C:\Documents and Settings\UserName\My Documents
\Convert.exe ""C:\Documents and Settings\UserName\My Documents
\Convert.exe"""

Can someone help me get this going, please?

Many thanks!
Ed

My System SpecsSystem Spec
Old 01-13-2009   #2 (permalink)
Al Dunbar


 
 

Re: Trying to mimic "Start/Run" in Win 2000/XP?


"Ed from AZ" <prof_ofwhat@xxxxxx> wrote in message
news:bed39c12-d669-40f5-bfa3-918c735167da@xxxxxx
Quote:

>I can input a line into Start / Run and it works fine. I'm trying to
> put that into a script so I can automate it. Unfortunately, my
> expertise (what little I have!) is VBA macros, not scripting.
>
> What I have is:
>
> Set WSHShell = CreateObject("WScript.Shell")
> WSHShell.Run "C:\Documents and Settings\UserName\My Documents
> \Convert.exe ""C:\Documents and Settings\UserName\My Documents
> \Convert.exe"""
>
> Can someone help me get this going, please?
>
> Many thanks!
> Ed

My System SpecsSystem Spec
Old 01-13-2009   #3 (permalink)
Al Dunbar


 
 

Re: Trying to mimic "Start/Run" in Win 2000/XP?


"Ed from AZ" <prof_ofwhat@xxxxxx> wrote in message
news:bed39c12-d669-40f5-bfa3-918c735167da@xxxxxx
Quote:

>I can input a line into Start / Run and it works fine. I'm trying to
> put that into a script so I can automate it. Unfortunately, my
> expertise (what little I have!) is VBA macros, not scripting.
>
> What I have is:
>
> Set WSHShell = CreateObject("WScript.Shell")
> WSHShell.Run "C:\Documents and Settings\UserName\My Documents
> \Convert.exe ""C:\Documents and Settings\UserName\My Documents
> \Convert.exe"""
>
> Can someone help me get this going, please?
Assuming that the command line you want to run is simply to run convert.exe
with no parameters, try this:

Set WSHShell = CreateObject("WScript.Shell")
WSHShell.Run """C:\Documents and Settings\UserName\My
Documents\Convert.exe"""

If a parameter is required, try this:

Set WSHShell = CreateObject("WScript.Shell")
WSHShell.Run """C:\Documents and Settings\UserName\My
Documents\Convert.exe"" parameter"

If the parameter is the path to a file, it should probably be quoted as
well:

Set WSHShell = CreateObject("WScript.Shell")
WSHShell.Run """C:\Documents and Settings\UserName\My
Documents\Convert.exe"" ""C:\program files\z\setup.ini"""


/Al


My System SpecsSystem Spec
Old 01-14-2009   #4 (permalink)
Ed from AZ


 
 

Re: Trying to mimic "Start/Run" in Win 2000/XP?

Thank you, Al! That got me going.

Ed

On Jan 13, 3:42*pm, "Al Dunbar" <aland...@xxxxxx> wrote:
Quote:

> "Ed from AZ" <prof_ofw...@xxxxxx> wrote in messagenews:bed39c12-d669-40f5-bfa3-918c735167da@xxxxxx
>
Quote:

> >I can input a line into Start / Run and it works fine. *I'm trying to
> > put that into a script so I can automate it. *Unfortunately, my
> > expertise (what little I have!) is VBA macros, not scripting.
>
Quote:

> > What I have is:
>
Quote:

> > Set WSHShell = CreateObject("WScript.Shell")
> > WSHShell.Run "C:\Documents and Settings\UserName\My Documents
> > \Convert.exe ""C:\Documents and Settings\UserName\My Documents
> > \Convert.exe"""
>
Quote:

> > Can someone help me get this going, please?
>
> Assuming that the command line you want to run is simply to run convert.exe
> with no parameters, try this:
>
> Set WSHShell = CreateObject("WScript.Shell")
> WSHShell.Run """C:\Documents and Settings\UserName\My
> Documents\Convert.exe"""
>
> If a parameter is required, try this:
>
> Set WSHShell = CreateObject("WScript.Shell")
> WSHShell.Run """C:\Documents and Settings\UserName\My
> Documents\Convert.exe"" parameter"
>
> If the parameter is the path to a file, it should probably be quoted as
> well:
>
> Set WSHShell = CreateObject("WScript.Shell")
> WSHShell.Run """C:\Documents and Settings\UserName\My
> Documents\Convert.exe"" ""C:\program files\z\setup.ini"""
>
> /Al
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
"right click" and "open" on an icon does not start the program! Vista General
VS 2003: "Start Application" disabled in "Debugging" .NET General
start menu "music" and "pictures" Vista music pictures video
"Easy Transfer" download difficulty (to Windows 2000)... Vista installation & setup
"Easy Transfer" download difficulty (to Windows 2000)... Vista General


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