Even though this post is almost 6 years old I still found it and had the same problem (but with Win7). My RunOnceEx process contains a bunch of reboot command, and the only reliable way of doing it for me was to: Add Flags = 0x3 (run synchronous and delete entry after run) And then run shutdown command that also kills the RunOnceEx process The shutdown command is crucial since if shutdown process exits the next item on the RunOnceEx list will be processed and interruped in the middle of an item, since a shutdown is in progress. The solution I found was to execute a kill command of the RunOnceEx process and then shutting down Windows. That's the only reliable way of doing it. One would think that just executing shudown and then pausing: shutdown /r /t 0 /f & pause would also do the trick. But noo. If Windows terminates the shell that executes that command before the RunOnceEx process, then it will stop waiting for the process to finish (since it was killed) and continue to the next. Bottom line, kill it first and then shut down: taskkill /im rundll32.exe /f & shutdown /r /t 0 /f Since it needs to be run in a shell the RunOnceEx entry will look something like this: REG ADD %KEY%\001 /V 1 /D "cmd /k taskkill.exe /im rundll32.exe /f & shutdown /r /f /t 0" /f In XP the taskkill might not be available, try tskill instead.