Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sh.Run explanation for opening applications 1

Status
Not open for further replies.

rockofvictory

IS-IT--Management
Sep 24, 2001
12
US
I had received some help a while ago on a different website on how to open multiple applications with one vbs shortcut. I don't know vbs, so hopefully this will be an easy one for you guys and gals:
Code:
set sh = CreateObject("WScript.Shell")
sh.Run """iexplore",1,false
sh.Run """explorer",1,false
sh.Run """C:\Program Files\Radmin\radmin.exe",1,false
set sh = nothing

What does ",1,false" mean? I would like a delay between opening files, if possible. How would I do that?

~
 
The syntax of the Run method is:
Code:
object.Run(strCommand,[intWindowStyle],[bWaitOnReturn])
1 for intWindowStyle means strCommand is run with this standard window size and position.
bWaitOnReturn is a boolean saying if your script must suspend itself until strCommand complete execution.
For delaying:
Code:
WScript.Sleep intTime
where intTime is a number of milliseconds.

Hope This Help
PH.
 
Awesome. SO helpful. What a great little tool.

What are some other intWindowStyle options - or even better, where can I find a list of all these operations and functions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top