Actually to run it as a RunOnceEx you will need to change it to this: REG ADD %KEY%\004 /VE /D "PrintCD" /f REG ADD %KEY%\004 /V 1 /D "SETUP.exe -s -f2\"%systemroot%\Printcd.log\"" reason being is when it is merged into the registry it stops importing at that first quote I believe (not really sure if that is what happens though, just a guess ).