Jump to content

Recommended Posts

Posted

Hmm I'm struggling with the cleanup file.

I doesn't cleanup og even restart

It's run from runonceex.cmd

RunOnceEx.cmd

cmdow @ /HID
@echo off

FOR %%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\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installerer programmer" /f

REG ADD %KEY%01 /VE /D "Office 2003" /f
REG ADD %KEY%01 /V 1 /D "%CDROM%\Software\OfficeXP\setup.exe TRANSFORMS=Unattended.MST /qb-TRANSFORMS=Unattended.MST /qb-" /f

REG ADD %KEY%02 /VE /D "IrfanView 4.00" /f
REG ADD %KEY%02 /V 1 /D "%CDROM%\Software\IrfanView\IrfanView400Setup.exe" /f

REG ADD %KEY%03 /VE /D "Deep Burner 1.8.0.224" /f
REG ADD %KEY%03 /V 1 /D "%CDROM%\Software\DeepBurner\DeepBurner180224.exe" /f

REG ADD %KEY%04 /VE /D "WGAFIX" /f
REG ADD %KEY%04 /V 1 /D "%CDROM%\Software\WgaFix\WGAFIX.exe" /f

REG ADD %KEY%06 /VE /D "Rydder op og genstarter" /f
REG ADD %KEY%06 /V 1 /D "%CDROM%\Software\cleanup.cmd" /f

EXIT

(Rydder op og genstarter = Danish for Cleaning up and restarting) :-)

cleanup.cmd

cmdow @ HID
shutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...
net user aspnet delete

DEL %systemroot%.bmp
DEL %systemroot%WebWallpaper.jpg
DEL %systemroot%system32dllcache.scr
DEL %systemroot%system32.scr

DEL /S /Q %AllUsersProfile%Start MenuWindows Update.lnk
DEL /S /Q %AllUsersProfile%Start MenuSet Program Access and Defaults.lnk
DEL /S /Q %AllUsersProfile%Start MenuWindows Catalog.lnk

RD S Q %systemdrive%drivers
RD S Q %systemdrive%install

EXIT

what could be wrong ?


Posted (edited)

The first line of your cleanup.cmd should be

cmdow @ /HID

not

cmdow @ HID

edit: I just noticed a bunch of other errors in it as well

RD S Q should be RD /S /Q

DEL should be DEL /Q

also missed quotes and \

here. easier to just fix them all for ya.

cmdow @ /HID
shutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...
net user aspnet delete

DEL /Q %systemroot%\*.bmp
DEL /Q %systemroot%\WebWallpaper.jpg
DEL /Q %systemroot%\system32dllcache.scr
DEL /Q %systemroot%\system32.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

EXIT

Edited by jaws75
Posted (edited)

OK I edited it a few times so check it again...

also I don't know if this path is correct.

%systemroot%\system32dllcache.scr

I use Vista not XP so I don't know what it's referring to

hope it helps

Edited by jaws75
Posted

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 folder

It is locatet here: Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch

and is call" DeepBurner.lnk

cmdow @ /HID
shutdown.exe -r -f -t 60 -c Windows XP genstarter om 1 minut...
net user aspnet delete

DEL /Q %systemroot%\*.bmp
DEL /Q %systemroot%\WebWallpaper.jpg
DEL /Q %systemroot%\system32dllcache.scr
DEL /Q %systemroot%\system32.scr

DEL /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%\drivers
RD /S /Q %systemdrive%\install

EXIT

Posted

Look at the attatchment

These are the two folders im trying to delete files in.

underneath my cleanup file is shown

The part where the clean up files shuld delete three files from the "menuen start", works fine... but not the rest, how come ?

post-151939-1187865689_thumb.jpg

Posted

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!

Posted
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?

Posted
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 code

Set QL=%AppData%\Microsoft\Internet Explorer\Quick Launch\
Del /Q "%QL%DeepBurner.lnk"

Posted
Okay...whats the correct DEL command then?
Instead of using %AllUsersProfile% in those non-working deletions, change them to %UserProfile%
CMDOW @ /HID
SHUTDOWN -r -f -t 60 -c Windows XP genstarter om 1 minut...
NET USER aspnet delete

DEL /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%\drivers
RD /S /Q %systemdrive%\install

Posted

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?

Posted
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

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