I’ve written a little program that sends a “left Windows key pressed” key event which brings you to the desktop. All you have to do is start the .exe file after logging in.

You can do this by using either the task scheduler or the windows Startup folder (C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup).

However the task scheduler should be a bit faster.

How to use the task scheduler:

  1. Open the task scheduler and click on “Create Task…” on the right.

  2. Choose a name and go to Triggers.

  3. Click on “New” and choose “Begin the task: At Log on”.

  4. Go to Actions, click on “New”, browse for the .exe file and select it.

  5. If you are on a laptop, go to Conditions and deselect “Start the task only if the computer is on AC power”.

This should be all.

 

Here is the zipped .exe file:

 WinKey.zip

Here is the C++ source code:

`#include

Thanks to batchloaf for the SendInput tutorial.