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?
-
Are you able to explain why?– DaveNov 25, 2013 at 12:34
-
Not really. Curiosity?– torNov 25, 2013 at 12:38
-
Not a real question, it's unlikely to help any one now or in the future.– DaveNov 25, 2013 at 12:49
-
A more correct answer is that I do not want to disclose my reasons or overall goals in this case. It is not for pranks, though.– torNov 25, 2013 at 14:00
-
I'm interested in a way to accomplish this as well, if that's worth anything.– user201262Nov 26, 2013 at 0:45
Add a comment
|
2 Answers
You can route it through a batch that will "sleep" for the amount of time you want and then run it.
-
Is it possible to incorporate this directly in the shortcut properties, in the Target field?– torNov 25, 2013 at 13:28
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.