Rem *** This UO script is licensed under the GPL http://www.gnu.org/licenses/gpl.txt Rem *** Free to use, intended to remain free. Please credit the source. Rem Primary Development by Dan Albrich (dalbrich@uoregon.edu) Set Variable APPTITLE to Temporary File Cleanup Get System Information into WINVERSION Set Variable BOOTDRIVEA to %WIN% Parse String "%BOOTDRIVEA%" into CDRIVE and IGNORE If CDRIVE Does Not Contain ":" then Set Variable CDRIVE to C: End Rem The lines above give us the CDRIVE Set Variable TEMP1 to %TEMP% Set Variable TEMP2 to %CDRIVE%\Windows\Temp Rem Need lower case for "temp" test Rem A safe path to delete includes "temp" and we need to eliminate case Set Variable LTEMP1 to Lcase$(TEMP1) Set Variable LTEMP2 to Lcase$(TEMP2) If LTEMP1 Does Not Contain "temp" then Set Variable TEMP1 to End If LTEMP2 Does Not Contain "temp" then Set Variable TEMP2 to End Set Variable EXITQUIET to N Set Variable DIRECTION to N Wizard Loop Custom Dialog "ActualDelete Temp Files" If EXITQUIET Equals "N" then If WINVERSION Greater Than or Equal "5" then If TEMP1 Not Equal "" then Execute %sys%\cmd.exe /c DEL /f /s /q %TEMP1%\*.* End If TEMP2 Not Equal "" then Execute %sys%\cmd.exe /c DEL /f /s /q %TEMP2%\*.* End End If WINVERSION Less Than "5" then If TEMP1 Not Equal "" then Execute %win%\command\deltree.exe /y %TEMP1%\*.* End If TEMP2 Not Equal "" then Execute %win%\command\deltree.exe /y %TEMP2%\*.* End End End End Exit Installation