Add delay to desktop shortcut
7,754
Solution 1
You can route it through a batch that will "sleep" for the amount of time you want and then run it.
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.
Related videos on Youtube
Comments
-
tor over 1 year
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?
-
Dave over 10 yearsAre you able to explain why?
-
tor over 10 yearsNot really. Curiosity?
-
Dave over 10 yearsNot a real question, it's unlikely to help any one now or in the future.
-
tor over 10 yearsA 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.
-
Admin over 10 yearsI'm interested in a way to accomplish this as well, if that's worth anything.
-
-
tor over 10 yearsIs it possible to incorporate this directly in the shortcut properties, in the Target field?