i make silent install and i use this: $PreviousInstallation = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Registry Mechanic_is1", "InstallLocation") If StringRight($PreviousInstallation, 1) = '\' Then $PreviousInstallation = StringTrimRight($PreviousInstallation, 1) EndIf If FileExists($PreviousInstallation & "\RegMech.exe") Then MsgBox(0x40010, "Registry Mechanic 9", "Please uninstall previous version of Registry Mechanic before install the progarm..") Exit DirRemove(@AppdataDir & "\Registry Mechanic 9", 1) EndIf its not remove "Registry Mechanic 9" because the script process need to close and then remove the folder so i don't know what to do i want that after or before pressing OK button "Registry Mechanic 9" folder in AppdataDir will be removed thanks you