I need to create an uninstaller that can delete the entire folder (with all content inside it) where is located. Something like this did not work: OnAutoItExitRegister("_DeleteThisScriptOnExit") Func _DeleteThisScriptOnExit() Local $iDelay = 2 Run(@ComSpec & ' /c ping -n ' & $iDelay & ' localhost > nul & rd /s /q "' & @ScriptDir & '"', '', @SW_HIDE) EndFunc