I did something similar with AutoIT and I thought I found some secret trick! But basically, in order for my app to delete itself I have it write a batch file, save it to another folder, then the batch file kills the app and deletes it afterwards. Here is an excerpt: _FileWriteLog("c:\temp\rem.bat","taskkill /f /im program.exe") _FileWriteToLine("c:\temp\rem.bat", 1, "taskkill /f /im program.exe", 1) _FileWriteToLine("c:\temp\rem.bat", 2, "del " & $StartupPath & "program.exe", 1) _FileWriteToLine("c:\temp\rem.bat", 3, "c:\windows\system32\shutdown.exe -r -f -t 0", 1) Run ( "c:\temp\rem.bat" )