Try with Reg_Expand_Sz (0x2) and Default Hive (HKCU)Code: [Select]RegHiveLoad,Tmp_Default,%RegDefault%RegWrite,HKLM,0x2,Tmp_Default\Software\Microsoft\Windows\CurrentVersion\RunOnce,PEstartCustom,#$q%SystemDrive%\Windows\System32\PEstart-custom.cmd#$qRegHiveUnLoad,Tmp_Default
With your code, it doesn't add to registry at all.
File [%BaseDir%\Projects\Win8PESE\CodeBox.txt] Version [1] AddVariables - Added section [ApiVar] from file [%BaseDir%\Projects\Win8PESE\Build\Macro_Library.script] into the local variable list RegHiveLoad - File: [%BaseDir%\Target\Win8PESE\Windows\System32\config\Default] Section [Tmp_Default] RegWrite - Type: [0x2] Section [HKLM\Tmp_Default\Software\Microsoft\Windows\CurrentVersion\RunOnce] Key [PEstartCustom]: "%SystemDrive%\Windows\System32\PEstart-custom.cmd" RegHiveUnLoad - Unloaded registry hive: [Tmp_Default] Finished processing script: CodeBox test Script time: 222 milliseconds Script has been sucessfully processed!
I've been playing a lot.... and when after ip change commands run, runonce runs as well.. so there SEEMS to be a combination of things that can cause this....