Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to get a software that invokes a specific software if the PC is in sleep mode. For example, I use uTorrent to download large files. So if a user come to PC and need to start a normal browsing(say checking mails etc), he/she need to go to uTorrent and stop the downloading. When he/she leaves, the downloading have to be restarted manually.

Any idea about the software? OR is it easy to create a such one using C#.Net ?

share|improve this question
5  
My understanding of sleep mode is that program execution is suspended, so how can you invoke specific software while the PC is in sleep mode? –  pavium Jun 9 '11 at 13:35

2 Answers 2

You can't run anything when the computer is in sleep mode. Sleep mode stops all programs from running. If you are not dependent on sleep mode, you might be able to trigger it with an inactive time.

share|improve this answer

I'm not sure if there is any sleep event you can watch for from the user, but you could create a program that periodically checks current state. This program could schedule system wakes to occur at regular intervals (to ensure it runs after the machine's been suspended).

A quick Google search found some code (original site was down but there's a cached copy on Google) that allows you to schedule a wake event; it seems the EventWakeHandle class should provide you with the capability to run code when the system wakes up.

You won't be able to run code while the machine's suspended as the CPU is switched off, but waking it up every now and then to make sure whatever should be running is should work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.