3

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?

5
  • Are you able to explain why?
    – Dave
    Nov 25, 2013 at 12:34
  • Not really. Curiosity?
    – tor
    Nov 25, 2013 at 12:38
  • Not a real question, it's unlikely to help any one now or in the future.
    – Dave
    Nov 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.
    – tor
    Nov 25, 2013 at 14:00
  • I'm interested in a way to accomplish this as well, if that's worth anything.
    – user201262
    Nov 26, 2013 at 0:45

2 Answers 2

2

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

1
  • Is it possible to incorporate this directly in the shortcut properties, in the Target field?
    – tor
    Nov 25, 2013 at 13:28
6

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .