August 23, 200719 yr Hmm I'm struggling with the cleanup file.I doesn't cleanup og even restartIt's run from runonceex.cmdRunOnceEx.cmdcmdow @ /HID@echo offFOR %%i IN (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:\CD.txt SET CDROM=%%i:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installerer programmer" /fREG ADD %KEY%01 /VE /D "Office 2003" /fREG ADD %KEY%01 /V 1 /D "%CDROM%\Software\OfficeXP\setup.exe TRANSFORMS=Unattended.MST /qb-TRANSFORMS=Unattended.MST /qb-" /fREG ADD %KEY%02 /VE /D "IrfanView 4.00" /fREG ADD %KEY%02 /V 1 /D "%CDROM%\Software\IrfanView\IrfanView400Setup.exe" /fREG ADD %KEY%03 /VE /D "Deep Burner 1.8.0.224" /fREG ADD %KEY%03 /V 1 /D "%CDROM%\Software\DeepBurner\DeepBurner180224.exe" /fREG ADD %KEY%04 /VE /D "WGAFIX" /fREG ADD %KEY%04 /V 1 /D "%CDROM%\Software\WgaFix\WGAFIX.exe" /fREG ADD %KEY%06 /VE /D "Rydder op og genstarter" /f REG ADD %KEY%06 /V 1 /D "%CDROM%\Software\cleanup.cmd" /fEXIT(Rydder op og genstarter = Danish for Cleaning up and restarting) :-)cleanup.cmdcmdow @ HIDshutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...net user aspnet deleteDEL %systemroot%.bmpDEL %systemroot%WebWallpaper.jpgDEL %systemroot%system32dllcache.scrDEL %systemroot%system32.scrDEL /S /Q %AllUsersProfile%Start MenuWindows Update.lnkDEL /S /Q %AllUsersProfile%Start MenuSet Program Access and Defaults.lnkDEL /S /Q %AllUsersProfile%Start MenuWindows Catalog.lnkRD S Q %systemdrive%driversRD S Q %systemdrive%installEXITwhat could be wrong ?
August 23, 200719 yr The first line of your cleanup.cmd should becmdow @ /HIDnotcmdow @ HIDedit: I just noticed a bunch of other errors in it as wellRD S Q should be RD /S /QDEL should be DEL /Qalso missed quotes and \here. easier to just fix them all for ya.cmdow @ /HIDshutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...net user aspnet deleteDEL /Q %systemroot%\*.bmpDEL /Q %systemroot%\WebWallpaper.jpgDEL /Q %systemroot%\system32dllcache.scrDEL /Q %systemroot%\system32.scrDEL /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%\installEXIT Edited August 23, 200719 yr by jaws75
August 23, 200719 yr OK I edited it a few times so check it again...also I don't know if this path is correct.%systemroot%\system32dllcache.scrI use Vista not XP so I don't know what it's referring tohope it helps Edited August 23, 200719 yr by jaws75
August 23, 200719 yr Author hmm...maybe is shuld change start menu to menuen start as it's called (danish version), and if i shuld delete shortcuts on the desktop it's called skrivebord, so maybe this one will work ?I have applied the quick menu, but how do i delete a shortcut which is only in the administrator folderIt is locatet here: Administrator\Application Data\Microsoft\Internet Explorer\Quick Launchand is call" DeepBurner.lnkcmdow @ /HIDshutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...net user aspnet deleteDEL /Q %systemroot%\*.bmpDEL /Q %systemroot%\WebWallpaper.jpgDEL /Q %systemroot%\system32dllcache.scrDEL /Q %systemroot%\system32.scrDEL /Q "%AllUsersProfile%\Menuen Start\Windows Update.lnk"DEL /Q "%AllUsersProfile%\Menuen Start\Set Program Access and Defaults.lnk"DEL /Q "%AllUsersProfile%\Menuen Start\Windows Catalog.lnk"DEL /Q "%AllUsersProfile%\Skrivebord\DeepBurner.lnk"DEL /Q "%AllUsersProfile%\Skrivebord\IrfanView.lnk"DEL /Q "%AllUsersProfile%\Skrivebord\IrfanView Thumbnails.lnk"RD /S /Q %systemdrive%\driversRD /S /Q %systemdrive%\installEXIT
August 23, 200719 yr Author Look at the attatchmentThese are the two folders im trying to delete files in.underneath my cleanup file is shownThe part where the clean up files shuld delete three files from the "menuen start", works fine... but not the rest, how come ?
August 23, 200719 yr From your graphic, DeepBurner.lnk, IrfanView.lnk and IrfanView Thumbnails.lnk are all located under the Administrators Profile and you are trying to delete them from the All Users Profile!
August 23, 200719 yr Author From your graphic, DeepBurner.lnk, IrfanView.lnk and IrfanView Thumbnails.lnk are all located under the Administrators Profile and you are trying to delete them from the All Users Profile!Okay...whats the correct DEL command then?
August 23, 200719 yr From your graphic, DeepBurner.lnk, IrfanView.lnk and IrfanView Thumbnails.lnk are all located under the Administrators Profile and you are trying to delete them from the All Users Profile!Okay...whats the correct DEL command then?Are you using the account that was listed in the image you posted?If so then use a different varible for that folder.Try this in your codeSet QL=%AppData%\Microsoft\Internet Explorer\Quick Launch\Del /Q "%QL%DeepBurner.lnk"
August 23, 200719 yr Okay...whats the correct DEL command then?Instead of using %AllUsersProfile% in those non-working deletions, change them to %UserProfile%CMDOW @ /HIDSHUTDOWN -r -f -t 60 -c Windows XP genstarter om 1 minut...NET USER aspnet deleteDEL /Q "%SystemRoot%\*.bmp"DEL /Q "%SystemRoot%\Web\Wallpaper\*.jpg"DEL /Q "%SystemRoot%\system32\dllcache\*.scr"DEL /Q "%SystemRoot%\system32\*.scr"DEL "%AllUsersProfile%\Menuen Start\Windows Update.lnk"DEL "%AllUsersProfile%\Menuen Start\Set Program Access and Defaults.lnk"DEL "%AllUsersProfile%\Menuen Start\Windows Catalog.lnk"DEL "%UserProfile%\Skrivebord\DeepBurner.lnk"DEL "%UserProfile%\Skrivebord\IrfanView.lnk"DEL "%UserProfile%\Skrivebord\IrfanView Thumbnails.lnk"DEL "%AppData%\Microsoft\Internet Explorer\Quick Launch\DeepBurner.lnk"RD /S /Q %systemdrive%\driversRD /S /Q %systemdrive%\install
August 23, 200719 yr OK I don't understand these...DEL "%SystemRoot%\WebWallpaper.jpg"DEL "%SystemRoot%\system32dllcache.scr"DEL "%SystemRoot%\system32.scr"do you mean this...DEL /q "%SystemRoot%\Web\Wallpaper\*.jpg"DEL /q "%SystemRoot%\system32\dllcache\*.scr"DEL /q "%SystemRoot%\system32\*.scr"this will delete all .jpg and .scr files in those directories.And Yzöwl doesn't the del command need the /q switch to be silent or won't it ask you to confirm on each del command?
August 24, 200719 yr OK I don't understand these...DEL "%SystemRoot%\WebWallpaper.jpg"DEL "%SystemRoot%\system32dllcache.scr"DEL "%SystemRoot%\system32.scr"do you mean this...DEL /q "%SystemRoot%\Web\Wallpaper\*.jpg"DEL /q "%SystemRoot%\system32\dllcache\*.scr"DEL /q "%SystemRoot%\system32\*.scr"this will delete all .jpg and .scr files in those directories.I suspect you are correct,since it appears that the backslashes were missing in the opening post!And Yzöwl doesn't the del command need the /q switch to be silent or won't it ask you to confirm on each del command?No the /q switch is not needed in those cases, it is only required on those lines using 'global wildcards', i.e. those using asterisks.I have altered my example to make the same assumptions as yourself on those files too!
Create an account or sign in to comment