Scheduled start and close windows everday

Is there a way wake windows from sleep and put it back to sleep at certain times everyday? I tried scheduling this with Task Scheduler by creating a Batch file and running it then simply making a wake up and running a program. The Task Scheduler would not let me schedule a task without setting a password so, now when it wakes it requires a user password to get to the desktop. I want it to wake up and run some programs.

I am going away for a bit and wanted to try a little project to see if I can make my computer start every night at 9 pm and leave it on for updates and keeping my Blizzard Games up to date. Starting the programs isn't the issue. I am stuck at trying to get past the Windows user log in. I tried getting rid of my password and then the Task Scheduler won't run.

I tried two different way of doing this. First just tried waking the compere and running cmd.exe and created an argument to exit cmd right away. The second way was by creating a batch file to wake the computer. Both of them worked but Again! were stuck at the log in screen.

It this possible without a registry hack?

You can stop your computer from asking your password on waking from the sleep state. But I don't think this is what you would prefer. If you are wondering How it is done here it is:

Click on the Power Options(Or navigate to it):


Click on Require A password on wakeup:

Then It is pretty easy:


Hit Save changes and you are done. Hope it helps.

It sounds like you want to create a windows service. The simplest way might be to use sc.exe http://sourcedaddy.com/windows-7/managing-services-using-sc-exe-command.html or you might want to try something like runasservice (I have not actually used this). http://runasservice.com/

Once you have a service to do what you need you simply have it set to automatically start when the machine is on, there should be no need for an interactive user session.

Thank you that is what I was looking for. Now I am faced with another problem. It doesn't look like it is fully waking up. I hear the computer come on at the scheduled time except the screen is black and it won't any programs unless I physically hit a key to wake the screen.

I used a Batch file to wake the PC from sleep and tried launching my webcam motion detection and it didn't launch until I hit a key to wake the screen.

The Batch file I created was from a notepad document and typed "echo hello" and saved it as wake.bat. After this I selected it as the Action to perform in Task Scheduler. It works but it doesn't wake the screen up. If I don't hit a key or move the mouse it will go off with a blinking power light on the front panel.

It sounds like you want to create a windows service.

Wouldn't that require some programming?

By the way that happens because you need to add a pause line. Once the batch file finishes, it will go back to sleep.

Thank you, for continuing to reply to these question..
I'm not totally sure about that the pause line thing, I tried it on my laptop and it wakes to the desktop like I want it to. I want my Home PC to do this and I am stuck at the black screen. I tried a couple of different ways. First I tried having Task Scheduler launching cmd.exe and then creating an argument to close it right away and I get a black screen on my Home PC. Second way, I tried creating a batch file and it does the same thing with the black screen. I'm thinking it is either a video driver or a setting that is causing it to do this. However I don't know where to start troubleshooting. I downloaded the lateset Nvidia driver for my gtx 760 and it does the same thing. As for the settings I'm not sure where to look for something like that.

@Honitsten This is as far as I can help you. I don't know much. Have you tried running other programs, or playing a sound. Maybe this will help you troubleshoot your problems further. If this doesn't work you need o make your own service like @BGL mentioned. Good luck

@utkumaden

I've just had another idea about how you could try to do this.

You could try scheduling a task to start on a trigger, and set the trigger to be an event that always occurs when your PC wakes up. You can also set the task to run whether the user is logged in or not.

This looks like it should work;

BTW - Creating a service does not necessarily require programming skills, just more batch writing using SC.exe or some PowerShell e.g;

PS C:> new-service -name TestService -binaryPathName "C:\WINDOWS\System32\svchost.exe -k netsvcs"

Hope you get it all working as required whatever solution you use.