Jump to content

People Favorite Clean Up Cmds


Recommended Posts

i got this error

C:\Install>REN C:\WINDOWS\System32\dllcache\notepad.exe notepad.old
A duplicate file name exists, or the file
cannot be found.

C:\Install>COPY "C:\install\notepad.exe" "C:\WINDOWS\System32\dllcache\"
       1 file(s) copied.

C:\Install>REN C:\WINDOWS\System32\notepad.exe notepad.old
A duplicate file name exists, or the file
cannot be found.

C:\Install>COPY "C:\install\notepad.exe" "C:\WINDOWS\System32\"
       1 file(s) copied.

C:\Install>REN C:\WINDOWS\notepad.exe notepad.old
A duplicate file name exists, or the file
cannot be found.

C:\Install>COPY "C:\install\notepad.exe" "C:\WINDOWS"
       1 file(s) copied.

and notepad does not change into the metapad

Link to comment
Share on other sites


Just did a test run and it seems to work fine for me. :)

(some other however.... )

So, I did this:

1. Renamed metapad to notepad. Moved it to my install dir, which is:

$OEM$\$1\install\notepad.exe

2. Then I added these commands to my $OEM$\$1\install\cleanup.cmd

REN %windir%\System32\dllcache\notepad.exe notepad.old

COPY "%systemdrive%\install\notepad.exe" "%windir%\System32\dllcache\"

REN %windir%\System32\notepad.exe notepad.old

COPY "%systemdrive%\install\notepad.exe" "%windir%\System32\"

REN %windir%\notepad.exe notepad.old

COPY "%systemdrive%\install\notepad.exe" "%windir%"

My cleanup.cmd is the last thing that runs before final reboot.

I think thats about it. Im got XP here so I dont need the other stuff Aaron posted earlier...

After the first test run 15min ago I think it was working fine.

I use VMware to test but i dont think there should be a problem in real

install.

:)

Link to comment
Share on other sites

uhm, sorta...renaming the one in dllcache makes it so that when windows does its little wfp thing, it doesnt copy windows notepad over metapad...he renames it to old just to keep it in case, I assume...so thats why notepad.exe is renamed to notepad.old in every case...but the reason its done in dllcache first is because of wfp.

Unrelated to your post, but I just noticed your sig. Looks like I started a trend :P

@Aaron: What's different about the Win2K3 version of the Remote Desktop Client and where would one go about acquiring it?

Link to comment
Share on other sites

RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Music\"
RD /S /Q "%AllUsersProfile%\Documents\My Music\Sample Playlists\"
RD /S /Q "%AllUsersProfile%\Documents\My Pictures\Sample Pictures\"

gets rid of sample music etc.

Link to comment
Share on other sites

@Aaron: What's different about the Win2K3 version of the Remote Desktop Client and where would one go about acquiring it?

Its got the auto-reconnect feature, which it does in 20 attempts. I don't think XP's mstsc.exe does this. I haven't tried the remote desktop client for XP SP2 which was posted on Microsoft Downloads just recently though.

Link to comment
Share on other sites

here's mine

cmdow @ /HID

MD "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\*.*" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Annotations" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\PictureTasks" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Printme" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\Search.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\EWH32.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"

start /wait net user hilfeassistent /delete
start /wait net user SUPPORT_388945a0 /delete
rem start /wait net user ASPNET /delete
RD /S /Q "%systemroot%\Web\Wallpaper\"
RD /S /Q "%AllUsersProfile%\Startmen?\Programme\PrintMe Internet Printing"
DEL "%AllUsersProfile%\Desktop\Adobe Reader 6.0.lnk" /Q
DEL "%AllUsersProfile%\Desktop\Nero StartSmart.lnk" /Q
DEL "%AllUsersProfile%\Desktop\Java Web Start.lnk" /Q
DEL %systemroot%\system32\L3codeca.acm /Q
DEL "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk" /Q
DEL "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch\Internet Explorer Browser starten.lnk" /Q
DEL "%AllUsersProfile%\Startmen?\Windows Update.lnk" /Q
DEL "%AllUsersProfile%\Startmen?\Programmzugriff und -standards.lnk" /Q
DEL "%AllUsersProfile%\Startmen?\Windows-Katalog.lnk" /Q
DEL "%systemroot%\system32\dllcache\*.*" /Q
DEL "%systemroot%\Driver Cache\i386\*.*" /Q
RD /S /Q "%AllUsersProfile%\Startmen?\Programme\Xvid"
RD /S /Q "%AllUsersProfile%\Startmen?\Programme\Java Web Start"

copy "%systemdrive%\i\links\*.lnk" "%AllUsersProfile%\Startmen?\"
copy "%systemdrive%\i\startm\*.lnk" "%AllUsersProfile%\Startmen?\Programme"
copy "%systemdrive%\i\quickl\*.lnk" "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch"

REGEDIT /S %systemdrive%\i\codecreg.reg
REGEDIT /S %systemdrive%\i\applications.reg
regsvr32 /s /u "C:\Programme\Gemeinsame Dateien\Ahead\DSFilter\NeAudio.ax"
regsvr32 /s /u "C:\Programme\Gemeinsame Dateien\Ahead\DSFilter\NeVideo.ax"

attrib -R "%programfiles%\CPUIdle\*.*" /S /D
attrib -R "%programfiles%\notepad2\*.*" /S /D
attrib -R "%programfiles%\Flashfxp\*.*" /S /D
attrib -R "%programfiles%\IrfanView\*.*" /S /D
attrib -R "%programfiles%\zoomplayerpro\*.*" /S /D
attrib -R "%programfiles%\Maxthon\*.*" /S /D
attrib -R "%programfiles%\Zubeh”r\*.*" /S /D
attrib -R "%programfiles%\Winamp\*.*" /S /D

for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist "%%i\system volume information" cacls "%%i\system volume information" /e /g Administrator:f
for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist "%%i\system volume information" attrib -s -r -h "%%i\system volume information"
rem for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist "%%i\system volume information" rd /s /q "%%i\system volume information"

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Abarbeiten der Hintergrund-Prozesse" /f
REG ADD %KEY%\001 /VE /D "Boot-Defragmentierung" /f
REG ADD %KEY%\001 /V 1 /D "Rundll32.exe advapi32.dll,ProcessIdleTasks" /f

shutdown.exe -r -f -t 30 -c "Windows XP wird in 30 Sekunden neu gestartet, es hat somit gen?gend Zeit, Verkn?pfungen zu aktualisieren und die Shell einmal vollst„ndig aufzubauen, bevor es neu gestartet werden kann!"
RD /S /Q %systemdrive%\i\
EXIT

Link to comment
Share on other sites

Hi,

I use it through XPlode, but this i my way of moving, creating and deleting file's or whatever i want!

Hope you can use it if you see something in here:

 <item display='Moving startmenu files / directorys'>
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Nero' target='%ALLUSERSPROFILE%\Start Menu\Programs\CD-DVD tools\Nero' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Norton AntiVirus' target='%ALLUSERSPROFILE%\Start Menu\Programs\Security\Norton AntiVirus' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Logitech\iTouch Configuration.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Hardware\iTouch Configuration.lnk' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Logitech\Mouse Properties.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Hardware\Mouse Properties.lnk' />
 <move source='%USERPROFILE%\Start Menu\Programs\Windows Media Player.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Music\Windows Media Player.lnk' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\WinRar\WinRAR.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Tools\WinRAR.lnk' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\MSN Messenger 6.2.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Internet\MSN Messenger 6.2.lnk' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Windows Movie Maker.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\Windows Movie Maker.lnk' />
 <move source='%ALLUSERSPROFILE%\Start Menu\Programs\Games' target='%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\Games' />
 <!--move source='%USERPROFILE%\Start Menu\Programs\Internet Explorer.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Internet\Internet Explorer.lnk' /-->
 <!--move source='%USERPROFILE%\Start Menu\Programs\Outlook Express.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Internet\Outlook Express.lnk' /-->
 <!--move source='%USERPROFILE%\Start Menu\Programs\Accessories\Address Book.lnk' target='%ALLUSERSPROFILE%\Start Menu\Programs\Internet\Address Book.lnk' /-->
 </item>
 <item display='Creating start menu shortcuts'>
 <shortcut display='Ad-Aware' program='%ProgramFiles%\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe' description='Spyware remover' link='%ALLUSERSPROFILE%\Start Menu\Programs\Security\Ad-Aware SE Personal.lnk'/>
 </item>
 <item display='Cleaning up'>
 <delete source='%SYSTEMROOT%\Cache\Adobe Reader 6.0.1' />
 <delete source='%ALLUSERSPROFILE%\Desktop\Adobe Reader 6.0.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\Adobe Reader 6.0.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\PrintMe Internet Printing' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\Java Web Start' />
 <delete source='%ALLUSERSPROFILE%\Desktop\Java Web Start.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Windows Update.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Windows Catalog.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Set Program Access and Defaults.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\CD-DVD tools\Nero\Nero StartSmart.lnk' />
 <delete source='%ALLUSERSPROFILE%\Desktop\Nero StartSmart.lnk' />
 <delete source='%USERPROFILE%\Start Menu\Programs\Windows Media Player.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\Windows Media Player.lnk' />
 <delete source='%USERPROFILE%\Start Menu\Programs\Remote Assistance.lnk' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\Logitech' />
 <delete source='%USERPROFILE%\Start Menu\Programs\WinRar' />
 <delete source='%ALLUSERSPROFILE%\Start Menu\Programs\WinRar' />
 <!--delete source='%ALLUSERSPROFILE%\Desktop\Norton AntiVirus 2003.lnk' /-->
 <!--delete source='%USERPROFILE%\Desktop\Norton AntiVirus 2003.lnk' /-->
 </item>

Link to comment
Share on other sites

@swgreed

I have some q's about your cleanup, which may help me with mine :)

MD "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\*.*" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Annotations" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\PictureTasks" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Printme" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\Search.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\EWH32.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"

1) Is this the way to speed up acrobat reader 6? Does this work perfectly?

start /wait net user hilfeassistent /delete
start /wait net user SUPPORT_388945a0 /delete
rem start /wait net user ASPNET /delete

2) What are these / What do they do?

DEL "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch\Nero StartSmart.lnk" /Q
DEL "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch\Internet Explorer Browser starten.lnk" /Q
DEL "%AllUsersProfile%\Startmen?\Windows Update.lnk" /Q

3) I notice sometimes you write an actual user name, and other times just AllUsers. Can AllUser be used for everything - ex: QuickLaunch?

3a) If not, how do you know what the username will be / How do you set it up so you know what the username will be?

Is there some kind of comman %currentuser% which substitues the user in (kinda like %systemdrive%)?

copy "%systemdrive%\i\links\*.lnk" "%AllUsersProfile%\Startmen?\"
copy "%systemdrive%\i\startm\*.lnk" "%AllUsersProfile%\Startmen?\Programme"
copy "%systemdrive%\i\quickl\*.lnk" "%userprofile%\Anwendungsdaten\Microsoft\Internet Explorer\Quick Launch"

4) This is a way to "backup" and put your shortcuts onto the newly installed system, right?

attrib -R "%programfiles%\CPUIdle\*.*" /S /D
attrib -R "%programfiles%\notepad2\*.*" /S /D
attrib -R "%programfiles%\Flashfxp\*.*" /S /D
attrib -R "%programfiles%\IrfanView\*.*" /S /D
attrib -R "%programfiles%\zoomplayerpro\*.*" /S /D
attrib -R "%programfiles%\Maxthon\*.*" /S /D
attrib -R "%programfiles%\Zubeh”r\*.*" /S /D
attrib -R "%programfiles%\Winamp\*.*" /S /D

5) What do these do?

Link to comment
Share on other sites

@a06lp:

1) yes it speeds up AR6 (AR Speedup 1.28 does exactly the same)

2) this deletes delauft users coming with XP (remoteuser, help user, .NET user if installed) (note: here are German folder names involved)

3) This is because of different lnk- files that are in different folders

(you could say: %currentuser%==%userprofile%)

4) yes, the links from the installation CD get copied that way

5) programs from the CD in "$OEM$\$Progs" get copied write protected!

if you use a program from these folders, no changes you made will be saved, unless you turn off write protection!

Link to comment
Share on other sites

@swgreed:

2) this deletes delauft users coming with XP (remoteuser, help user, .NET user if installed) (note: here are German folder names involved)
I wasn't aware of all these default users. Any info on deleting them in an English version of XP SP2?

I ran "net user" in a cmd, and I got a listing of 7 accounts...I thought I only had 1!!

"__vmware user__" "ASPNET" "Guest" "HelpAssistant" "[my user name]" "[my name + Admin at the end] " "Support_388945a0"

How many of these automatically will show up when I do my unattended install? Which ones are useless/ How do I remove the useless ones?

5) programs from the CD in "$OEM$\$Progs" get copied write protected!

if you use a program from these folders, no changes you made will be saved, unless you turn off write protection!

Is this ONLY for files/folders you are copying to the "Program Files" folder? Or ANYTHING from the cd (ex: $OEM$\$1\...)?

I only use $OEM$\$1 and $OEM$\$$

If I am not copying anything into $Progs, do I need this?

ECHO Speeding Up Acrobat Reader (Moving Useless Plug-ins to Plug_insBAK)...
MD "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\*.*" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Annotations" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\PictureTasks" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_ins\Printme" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_insBAK"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\Search.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"
MOVE "%programfiles%\Adobe\Acrobat 6.0\Reader\plug_insBAK\EWH32.api" "%systemdrive%\Programme\Adobe\Acrobat 6.0\Reader\plug_ins"

I used this code in a regular .cmd file to test it out, but all that happened was "plug_insBAK" was created, and nothing was moved....what's wrong?

cmdow @ /HID

What does that do?

Thanks for your help!!

Link to comment
Share on other sites

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...