1. Create a .reg file with following and save it as C:\RunOnceEx.reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\0001] "RunOnceEx"="Notepad.exe" 2. Create following String Value entry under RunOnce key: ValueName = RunOnceEx and its value as Regedit /s C:\RunOnceEx.reg OR Alternatively to achieve the same create another .reg file as below and run it by double clicking on it. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] "RunOnceEx"="Regedit /s C:\\RunOnceEx.reg" The RunOnce reg entry when executed, after all RunOnceEx entries are executed(if any), will create entry to run Notepad in RunOnceEx and will not be initiated till next logon or reboot. At the next logon/reboot, RunOnceEx entries will be enumerated and as a result Notepad will fire up.