Jump to content

Recommended Posts

Posted

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 @ /HID
net user aspnet /delete

DEL "%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\

EXIT

I don't want to delete all the screen savers (*.scr) just the ones listed.


Posted

you could try using

Del /F /S

f = force

s = 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?

Posted

i prefer to use thos command line in \$OEM$\$1\install\run.cmd

also remember to have /q switch

eg

ECHO.

ECHO Removing annoying Wallpapers and Screensavers...

DEL "%systemroot%\*.bmp" /q

DEL "%systemroot%\Web\Wallpaper\*.jpg" /q

DEL "%systemroot%\system32\*.scr" /q

Posted

You should be able to

  • del /f /a /q

Something like this

@echo off&setlocal enableextensions
cmdow @ /hid
set togo=scrnsave ss3dfo ssbezier ssflwbox ssmarque ssmypics ssmyst sspipes ssstars sstext3d
net user aspnet /delete
del /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%\drivers
rd /s/q %systemdrive%\install
endlocal&goto :eof
:noscr
pushd %systemroot%\system32
for /f %%b in ('dir /b/s/a-d %1^2^>nul') do del /f/a/q "%%b"
popd&goto :eof

Posted

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.

Posted
You should be able to
  • del /f /a /q

Something like this

@echo off&setlocal enableextensions
cmdow @ /hid
set togo=scrnsave ss3dfo ssbezier ssflwbox ssmarque ssmypics ssmyst sspipes ssstars sstext3d
net user aspnet /delete
del /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%\drivers
rd /s/q %systemdrive%\install
endlocal&goto :eof
:noscr
pushd %systemroot%\system32
for /f %%b in ('dir /b/s/a-d %1^2^>nul') do del /f/a/q "%%b"
popd&goto :eof

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.

Posted

the bestway is integrate your windows with patched sfc_os.dll

and enter the related registry entry

If u r deleting those stuff, then why do u need WFP, disable it.

Posted

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.

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...