Add delay to desktop shortcut

Is there any lightweight way I can add a delay to a desktop shortcut (Windows 7), so that when I click on it, the application will not open until the specified delay has passed?


Solution 1:

You can route it through a batch that will "sleep" for the amount of time you want and then run it.

Batch - Option one

Batch - Option two

Solution 2:

OK, so I did further research and I found the answer to my own question:

In the shortcut Properties -> Shortcut -> Target field, I typed this

C:\Windows\System32\cmd.exe /c C:\Windows\System32\timeout.exe /T 3 /nobreak > nul && "C:\Program Files\MyProgram\Program.exe" argument /flag
  • The /c flag is to close the cmd window after the program has ran.
  • The /T flag is to specify the timeout (3 in this case).
  • The /nobreak flag is to prevent that keybord input will cancel the wait.
  • The > nul is so that nothing shows up on the cmd window while waiting.

It is basically using batch commands, but compressing it all into one line referenced in the shortcut. Run the script as minimized to avoid the black cmd window show while waiting.