I started using a separate script with a runonce command to delete the scripts directory. I found that it was unreliable to use the rmdir method. Try this in setupcomplete.cmd: Code: :CLEANUP reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /f /v "CLEANUP" /d "C:\Windows\Setup\Scripts\Post-Setup.cmd" and just move the rmdir stuff to Post-Setup.cmd in the scripts directory. There's something about the setupcomplete portion of setup that is just causing problems with deletion and program running sometimes. I think it's because they are starting a lot of the services and installing apps and such.