Run a Program Only Once when you Boot Into Windows

When you boot into Windows, many of the user installed 3rd party applications start loading themselves up around the time you see the desktop, and will continue to do so until they’ve all completely loaded into memory. The problem with Windows is there are so many different methods for an application to load itself while booting, it can be quite difficult to keep track. That’s where a utility such as Sysinternals Autoruns comes in useful because it can help tell you what’s being started and from which location.

One of the auto startup locations and the most commonly used by software is the Run key in the registry which itself is located in at least 2 different places, the main ones are:



Users of 64-bit Windows will also get another 2 Run registry keys found in Software\Wow6432Node\Windows\CurrentVersion\Run for both Current user and Local machine. These are certainly some of the most important registry keys you should memorize because everything in the keys will start every time you boot into Windows. It is a favorite place for malware to insert itself so it can start with Windows and problematic software can be disabled from here as well. Although the Run key executes all included programs on every boot (apart from booting to Safe Mode), there is another Run key that also boots all programs in its key. This key though, will run the programs when Windows boots the next time only, then the entries will be deleted and not executed again. The key is called RunOnce. Usually, the RunOnce key is used to delete system or locked files, and also by some software to make changes during a reboot.

registry runonce

Adding a program to RunOnce is very simple, all you need to do is create a new String value in the RunOnce key and provide the full path to the program that you want to run for the value. Even though getting things wrong in RunOnce won’t cause major issues, it’s understandable for people not wanting to take the risk. That’s why you can easily do it by using a free and portable tool called RunItOnce.

Simply execute the RunItOnce tool and it will open a file requester dialog asking you to select the program to run once on next boot. It will accept a .exe, .cmd, .bat file or a Windows shortcut. After clicking Open, if you were to look in the registry, you’ll see the key value will have instantly been created.



A limitation to this tool is you can only add and cannot edit or delete the RunOnce keys, you have to do it manually using the Windows Registry. Or alternatively, download and execute this registry file which will delete any keys created by RunItOnce.

Download RunOnce Delete Registry File

RunItOnce can also be executed from the command prompt or batch files because it accepts the program to add as an argument. Please make sure to open the RunItOnce tool as administrator or else it won’t be able to make changes to the Windows registry and will give an error “RunItOnce Failed for: ProgramName”.

Download RunItOnce

The makers of RunItOnce, Favesoft, have also created another very similar tool which can add entries into the Run registry key so they run on every boot. The program is simply called RunIt and works in exactly the same way as RunItOnce.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please ask in our forum or contact us directly.