Home » Questions » Computers [ Ask a new question ]

How can i initiate a windows task from a shortcut?

How can i initiate a windows task from a shortcut?

I've created 2 tasks in Task Scheduler on my Vista PC start uTorrent at 2am then close uTorrent (and shutdown PC) at 7am. However i'd like to only like this task to run if I've clicked a shortcut - ideally show something in the tray as well if possible. But not sure how?

Asked by: Guest | Views: 210
Total answers/comments: 1
Guest [Entry]

"You can control your scheduled tasks using schtasks console command. So you may create a task performing on system start-up disabling you tasks with something like that in .bat file:

schtasks /Change /DISABLE /TN ""Start uTorrent""
schtasks /Change /DISABLE /TN ""System shutdown""

And then you may create a shortcut to another .bat file enabling tasks once clicked, like:

schtasks /Change /ENABLE /TN ""Start uTorrent""
schtasks /Change /ENABLE /TN ""System shutdown""

PS. And it should wake up your computer from sleep if you specified to do so in scheduled tasks, but it could be put to sleep again after some user-inactivity timeout."