MSFN Forum: Need a vbs script. that will run an exe but wait 30 minutes before ins - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need a vbs script. that will run an exe but wait 30 minutes before ins Rate Topic: -----

#1 User is offline   clivebuckwheat 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 562
  • Joined: 07-November 05

Posted 29 July 2012 - 04:39 PM

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "c:\myprogram.exe" 



But How do I make it wait 30 minutes before running it?

Thanks for any help you can offer it would be great.


#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,363
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 29 July 2012 - 05:40 PM

You should be able to use Sleep.
Set WshShell = CreateObject("WScript.Shell")
WScript.Sleep 30 * 60000
WshShell.Exec("C:\MyProgram.exe")

Where 30 is the number of minutes you desire.

#3 User is offline   clivebuckwheat 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 562
  • Joined: 07-November 05

Posted 29 July 2012 - 05:45 PM

thank you,

How does 30x60000 = 30 minutes, just trying to understand.

This post has been edited by clivebuckwheat: 29 July 2012 - 05:53 PM


#4 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,363
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 29 July 2012 - 05:50 PM

The sleep command uses milliseconds and there are 60000 milliseconds in one minute.

#5 User is offline   clivebuckwheat 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 562
  • Joined: 07-November 05

Posted 29 July 2012 - 07:34 PM

View PostYzöwl, on 29 July 2012 - 05:50 PM, said:

The sleep command uses milliseconds and there are 60000 milliseconds in one minute.


Thank you sir

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy