Reputation: 1245
I am creating a windows application as a startup application. It will be started automatically on system startup. I want to delay the start time of my application for 5 minutes. For this i have created a custom script with below code and placed it in 'startup' folder.
@Echo off
TIMEOUT /T 300
start /b /d "{application path}" application
It will launch the application immediately after delay time completed. At this time command prompt window is appearing as below.
But for my requirement, this command prompt window must be hidden. How to do this?
Upvotes: 2
Views: 2061
Reputation: 1245
Instead of using batch file, i have created a console application to start my application. Placed this console application in 'startup' folder. It automatically triggered and launched the application on system startup.
Upvotes: 0
Reputation:
Use a vbscript to do this.
wscript.sleep 300000
CreateObject("wscript.shell").Run "C:\folder\file.exe"
You have to use above function to hide a command prompt - you may as well put the timeout into the vbs script. One less file.
Upvotes: 1