fly2279 Posted July 7, 2005 Share Posted July 7, 2005 I am using a .cmd file to delete some files, mainly bitmaps and screen savers. This is in my cleanup.cmd and created using the example file in the unattended guide. The bitmaps that are deleted stay deleted but the screen savers keep coming back after the script is run. Are they protected by windows file protection? Do I need to turn it off, delete the files and turn it back on? How can I do this?Here is the script:cmdow @ /HIDnet user aspnet /deleteDEL "%systemroot%\*.bmp"DEL "%systemroot%\system32\dllcache\ss3dfo.scr"DEL "%systemroot%\system32\dllcache\ssbezier.scr"DEL "%systemroot%\system32\dllcache\ssflwbox.scr"DEL "%systemroot%\system32\dllcache\ssmarque.scr"DEL "%systemroot%\system32\dllcache\ssmypics.scr"DEL "%systemroot%\system32\dllcache\ssmyst.scr"DEL "%systemroot%\system32\dllcache\sspipes.scr"DEL "%systemroot%\system32\dllcache\ssstars.scr"DEL "%systemroot%\system32\dllcache\sstext3d.scr"DEL "%systemroot%\system32\scrnsave.scr"DEL "%systemroot%\system32\ss3dfo.scr"DEL "%systemroot%\system32\ssbezier.scr"DEL "%systemroot%\system32\ssflwbox.scr"DEL "%systemroot%\system32\ssmarque.scr"DEL "%systemroot%\system32\ssmypics.scr"DEL "%systemroot%\system32\ssmyst.scr"DEL "%systemroot%\system32\sspipes.scr"DEL "%systemroot%\system32\ssstars.scr"DEL "%systemroot%\system32\sstext3d.scr"DEL "%AllUsersProfile%\Start Menu\Windows Update.lnk"DEL "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk"DEL "%AllUsersProfile%\Start Menu\Windows Catalog.lnk"RD /S /Q %systemdrive%\Drivers\RD /S /Q %systemdrive%\Install\EXITI don't want to delete all the screen savers (*.scr) just the ones listed. Link to comment Share on other sites More sharing options...
MHz Posted July 7, 2005 Share Posted July 7, 2005 you could try usingDel /F /Sf = forces = recurse subdirectories. That would halve your entries.But, seems like WFP is possibly replacing them? If so, you may need a patched SFC_OS.DLL? Link to comment Share on other sites More sharing options...
bhurtel Posted July 7, 2005 Share Posted July 7, 2005 i prefer to use thos command line in \$OEM$\$1\install\run.cmdalso remember to have /q switchegECHO.ECHO Removing annoying Wallpapers and Screensavers...DEL "%systemroot%\*.bmp" /qDEL "%systemroot%\Web\Wallpaper\*.jpg" /qDEL "%systemroot%\system32\*.scr" /q Link to comment Share on other sites More sharing options...
Yzöwl Posted July 7, 2005 Share Posted July 7, 2005 You should be able todel /f /a /qSomething like this@echo off&setlocal enableextensionscmdow @ /hidset togo=scrnsave ss3dfo ssbezier ssflwbox ssmarque ssmypics ssmyst sspipes ssstars sstext3dnet user aspnet /deletedel /f/a/q "%systemroot%\*.bmp"for %%a in (%togo%) do call :noscr "%%a.scr"del /q "%allusersprofile%\start menu\windows update.lnk"del /q "%allusersprofile%\start menu\set program access and defaults.lnk"del /q "%allusersprofile%\start menu\windows catalog.lnk"rd /s/q %systemdrive%\driversrd /s/q %systemdrive%\installendlocal&goto :eof:noscrpushd %systemroot%\system32for /f %%b in ('dir /b/s/a-d %1^2^>nul') do del /f/a/q "%%b"popd&goto :eof Link to comment Share on other sites More sharing options...
fly2279 Posted July 8, 2005 Author Share Posted July 8, 2005 Thanks, I'll try it. Let you know. Link to comment Share on other sites More sharing options...
RyanVM Posted July 8, 2005 Share Posted July 8, 2005 Try deleting the equivalent files back to back. In other words, delete "%systemroot%\system32\dllcache\ss3dfo.scr" and immediately after, delete "%systemroot%\system32\ss3dfo.scr". That should get rid of both copies before WFP is able to replace them (and yes, if a file is in dllcache, it's protected by WFP). Of course, you'll be prompted to insert your XP CD when WFP is unable to restore the file from the hard drive. Link to comment Share on other sites More sharing options...
fly2279 Posted July 8, 2005 Author Share Posted July 8, 2005 You should be able todel /f /a /qSomething like this@echo off&setlocal enableextensionscmdow @ /hidset togo=scrnsave ss3dfo ssbezier ssflwbox ssmarque ssmypics ssmyst sspipes ssstars sstext3dnet user aspnet /deletedel /f/a/q "%systemroot%\*.bmp"for %%a in (%togo%) do call :noscr "%%a.scr"del /q "%allusersprofile%\start menu\windows update.lnk"del /q "%allusersprofile%\start menu\set program access and defaults.lnk"del /q "%allusersprofile%\start menu\windows catalog.lnk"rd /s/q %systemdrive%\driversrd /s/q %systemdrive%\installendlocal&goto :eof:noscrpushd %systemroot%\system32for /f %%b in ('dir /b/s/a-d %1^2^>nul') do del /f/a/q "%%b"popd&goto :eof<{POST_SNAPBACK}>It didn't work, screen savers still there. I will still try RyanVM's suggestion but I really don't want a popup for inserting the cd just because I'm anal retentive and want to delete unused screen savers. Thanks for the replies guys. Link to comment Share on other sites More sharing options...
bhurtel Posted July 8, 2005 Share Posted July 8, 2005 the bestway is integrate your windows with patched sfc_os.dlland enter the related registry entryIf u r deleting those stuff, then why do u need WFP, disable it. Link to comment Share on other sites More sharing options...
RyanVM Posted July 8, 2005 Share Posted July 8, 2005 Like bhurtel said, you're going to have to disable WFP if you want to delete those files and not receive any prompts about doing it. Link to comment Share on other sites More sharing options...
fly2279 Posted July 8, 2005 Author Share Posted July 8, 2005 Well I figured out that I was just being stupid. I can take the XP cd out of the drive and WFP will let the files be deleted. Thanks for all the replies. Link to comment Share on other sites More sharing options...
Mike_Wilson Posted July 8, 2005 Share Posted July 8, 2005 If your xp cd is in the drive after it reboots it replaces them on boot, ive found this. You can delete all the screensavers but then if you reboot with the xp cd in the drive it seems to install them all again, dont hold me to this but if I remove the cd they dont come back. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now