TriggerHappyUK Posted January 13, 2011 Posted January 13, 2011 We are running Asus EeePc's with limited storage. To free space is there a batch file or scipt that can be run to remove all hotfix files ($NtUninstall....) hidden in the Windows folder. We are currently having to manually remove these files when updates are applied.
RabbieBurns Posted January 13, 2011 Posted January 13, 2011 does CCleaner - Optimization and Cleaning - Free Download do it?
andy_b Posted January 13, 2011 Posted January 13, 2011 (edited) Maybe have a script running CCleaner to tidy up the files. I think it has to run in the user context, so would be restricted to a logon script. See above Edited January 13, 2011 by andy_b too late
Jobos Posted January 13, 2011 Posted January 13, 2011 I use this vbs script. Option Explicit On Error Resume Next Dim FSO set FSO=CreateObject("Scripting.FileSystemObject") FSO.DeleteFolder("C:\Windows\$NtUninstall*") FSO.DeleteFolder("C:\Windows\$NtServicePackUninstall*") FSO.DeleteFolder("C:\Windows\$MSI31Uninstall*") FSO.DeleteFolder("C:\Windows\Temp\**") FSO.DeleteFile ("C:\Windows\Temp\*") FSO.DeleteFile ("C:\Windows\*.log") Set FSO = Nothing 1
TriggerHappyUK Posted January 13, 2011 Author Posted January 13, 2011 We do use CCleaner but have very limited HDD space on the EeePC's, so don't want to install anything onto them. We'll give the VB Script a go.
andy_b Posted January 13, 2011 Posted January 13, 2011 I believe portable version will run happily from a shared folder. Just out of personal interest, managed to get total size needed down to 556kB, using an older portable version with upx compression and deleting the dll's.
Arthur Posted January 13, 2011 Posted January 13, 2011 Deleting temporary files in the local users profiles might be worth a try too. The first batch file is for XP, while the second is for Vista and 7. @echo off IF "%OS%"=="" GOTO WIN9X @REM - FIND "DOCUMENTS AND SETTINGS" FOLDER: SET LOGPATH="C:\Documents and Settings\administrator\Local Settings\Application Data\Microsoft\WINDOWS NT\NTBACKUP\DATA" %SYSTEMDRIVE% CD %USERPROFILE%\.. FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\LOCAL SETTINGS\TEMP\*.*" FOR /D %%F IN (*.*) DO DEL /F/S/Q "%%F\LOCAL SETTINGS\TEMPORARY INTERNET FILES\*.*" DEL /F/S/Q %WINDIR%\TEMP\*.* DEL /F/S/Q %WINDIR%\*.TMP DEL /F/S/Q %LOGPATH%\*.LOG :GOTO END :WIN9X REM - WIN9X systems are currently not supported. :END or @echo off setlocal call :Clear_Folder %SystemRoot%\TEMP pushd C:\Users for /d %%k in (*) do if exist "%%k\AppData\Local\Temp" call :Clear_Folder "%%k\AppData\Local\Temp" popd endlocal goto :EOF :Clear_Folder pushd "%~1" for /d %%i in (*) do rd /s /q "%%i" del /f /q * popd goto :EOF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now