2

I have a computer that should have 0 user interactions. I want it to turn off and on on specific times.

Right now, i have a command that puts the computer to sleep. However i also need a task that wakes the computer up.

Right now i have made this:

echo WakeUp!
timeout /t 10
cd C:\Users\*\Desktop\nircmd
nircmd setcursor 100 50
nircmd movecursor 10 10

When i run this .bat file it opens cmd, says: WakeUp! And then pauses for 10 seconds and moves my mouse.

However, i'm letting it move my mouse because whenever the computer starts up from sleep mode, the screen stays black untill i press a button or move my mouse. So i was hoping that this would solve the "Black screen".

However it does not...

How can i wake my pc up and start the screen without any user interactions?

Mitch
  • 21
  • 2

1 Answers1

0

How can I wake my PC without any user interactions?

You can use a Scheduled Task. Instructions below.


How to Make Your PC Wake From Sleep Automatically

  1. Open the Task Scheduler by typing "Task Scheduler" into the "Start" menu if you are running Windows 10 or 7 (or "Start Screen" if you are using Windows 8.x) and pressing Enter.

    image

  2. In the "Task Scheduler" window, click the "Create Task" link to create a new task.

    image

  3. Name the task something like "Wake From Sleep."

    You may also want to tell it to run whether a user is logged on or not and set it to run with highest privileges.

    image

  4. On the "Triggers" tab, create a new trigger that runs the task at your desired time. This can be a repeating schedule or a single time.

    image

  5. On the "conditions" tab, enable "Wake the computer to run this task".

    image

  6. On the "Actions" tab, you must specify at least one action for the task – for example, you could have the task launch a file-downloading program.

    If you want to wake the system without running a program, you can tell the task to run cmd.exe with the /c "exit" arguments – this will launch a Command Prompt window and immediately close it, effectively doing nothing.

    image

  7. Save your new task after configuring it.

Source How to Make Your PC Wake From Sleep Automatically

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • By doing this (it's basically the same as i did) the screen just stays black untill i press a button or move my mouse. – Mitch Apr 12 '16 at 11:19
  • @Mitch Try adding `nircmd monitor on` to the batch file you run as the scheduled task. – DavidPostill Apr 12 '16 at 11:26
  • Right now i have: "echo WakeUp! cd C:\Users\mwiem\Desktop\nircms nircmd monitor on" However, it still wakes from sleep mode, but screen stays black til user interaction :/ – Mitch Apr 12 '16 at 11:31
  • That's because `echo` is echoing everything as one single command. Try `"echo WakeUp! && cd C:\Users\mwiem\Desktop\nircms && nircmd monitor on" `. See http://ss64.com/nt/syntax-redirection.html for info on `&&`. – DavidPostill Apr 12 '16 at 11:45
  • Again same problem. The pc turns on, but screen stays black until i move my mouse or touch a key of my keyboard – Mitch Apr 12 '16 at 11:56
  • Right now i have made 2 batch files. 1: "cd C:\Users\mwiem\Desktop\nircms && nircmd.exe standby" And one: "echo turnon && cd C:\Users\mwiem\Desktop\nircms && nircmd monitor on". This is working however when it turns on, the screen goes on for like 2 seconds, and then goes black again :/ @DavidPostill – Mitch Apr 12 '16 at 13:55