Jump to content

Cleanup.cmd Won' T Run


VATERNL

Recommended Posts

Troubles getting CleanUp.cmd running propperly

Problem:

I have tried to get my CleanUp.cmd running after my unattended windows,

drivers and applications install.

Somehow all works out fine, but the CleanUp.cmd does not do it' s job propperly.

After a succesfull install of windows, drivers and applications, the CleanUp.cmd

does not start.

When I manually klick the *.cmd, all gets cleaned as it should.

Tried several things, but nothing would make it run automatically.

also:

Is it possible to run the batchfiles from the DVD? This would be very handy;)

Does anyone know what I am doing wrong?

Thx in advance!!!!!

Info:

- Edited the "WINNT.sif" to my liking.

- Created an Unattended Apps install point and a "RunOnceEx.cmd" .

- I used Bâshrat the Sneaky's DriverPacks to integrate his cool packs.

- Created a "CleanUp.cmd" to clean the install folders and shortcuts fron c:\

after the installation.

File locations:

- "WINNT.sif" in the i386 folder

- "RunOnceEx.cmd" in the $oem$ folder ( including the cmdlines.txt to call

"RunOnceEx.cmd").

- "CleanUp.cmd" in the \$OEM$\$1\Install folder

Here is my current setup of WINNT.sif / RunOnceEx.cmd and CleanUp.cmd

winnt.sif

;
; XPSP2NL
;

[Data]
Autopartition = 0
MsDosInitiated = 0
UnattendedInstall = Yes

[Unattended]
UnattendSwitch = Yes
OemPreinstall = Yes
OemSkipEula = Yes
FileSystem = *
WaitForReboot = No
NoWaitAfterTextMode = 1
NoWaitAfterGUIMode = 1
TargetPath = Windows
DriverSigningPolicy = Ignore
NonDriverSigningPolicy = Ignore
Hibernation = No

[Display]
Xresolution = 1024
Yresolution = 768
BitsPerPel = 32
Vrefresh = 75

[GuiUnattended]
AdminPassword = "12345678"
AutoLogon = Yes
AdminPassword = *
TimeZone = 110
OEMSkipRegional = 1
OemSkipWelcome = 1

[Shell]
DefaultStartPanelOff = Yes

[Components]

[UserData]
ProductKey = "XXXXX-XXXXX-XXXXX-XXXXX"
ComputerName = WINXP
FullName = "WINXP-USER"
OrgName = "WINXP-USER"

[RegionalSettings]
Language = 0413

[Networking]

[Identification]
JoinWorkgroup = WORKGROUP

[URL]
Home_Page=http://www.google.nl

[GuiRunOnce]
command6= "%SystemDrive%\DP\G\Graphics_Control_Panels.cmd"
command7= "%SystemDrive%\DP\S\Sound_Control_Panels_1.cmd"
command8= "%SystemDrive%\DP\S\Sound_Control_Panels_2.cmd"

RunOnceEx.cmd

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\005 /VE /D "Microsoft.NET Framework v1.1 SP1" /f
REG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\Applications\DotNet_Framework_1.1_SP1\netfxsp1.exe" /f


REG ADD %KEY%\006 /VE /D "MSN Messenger V7.0" /f
REG ADD %KEY%\006 /V 1 /D "%systemdrive%\install\Applications\MSN\MsnMsgs.msi /QN" /f


REG ADD %KEY%\007 /VE /D "Office 2003" /f
REG ADD %KEY%\007 /V 1 /D "%systemdrive%\Install\Applications\Office2003\setup.exe TRANSFORMS="%systemdrive\install\Office\UNATTENDED.MST" /qb-" /f


REG ADD %KEY%\010 /VE /D "Office 2003 Service Pack 1" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Install\Applications\Office2003_Patches\Office2003SP1-kb842532-fullfile-nld /Q" /f


REG ADD %KEY%\012 /VE /D "Office 2003 Hot Fix KB890854" /f
REG ADD %KEY%\012 /V 1 /D "%systemdrive%\Install\Applications\Office2003_Patches\Office2003SP1-kb842532-fullfile-nld /Q" /f


REG ADD %KEY%\015 /VE /D "PaintShop Pro v9.1" /f
REG ADD %KEY%\015 /V 1 /D "%systemdrive%\install\Applications\PaintShopPro\JascPaintShopPro_v9.msi /qb!" /f


REG ADD %KEY%\017 /VE /D "Acrobat Reader v6.03" /f
REG ADD %KEY%\017 /V 1 /D "%systemdrive%\install\Applications\Adobe\acroread603.exe" /f


REG ADD %KEY%\020 /VE /D "Mozilla Firefox v1.01" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\install\Applications\Firefox\Firefox_1.0.1.exe /S" /f


REG ADD %KEY%\025 /VE /D "Opera v7.54" /f
REG ADD %KEY%\025 /V 1 /D "%systemdrive%\Install\Applications\Opera\ow32enen754u2.exe /S" /f


REG ADD %KEY%\027 /VE /D "Sun Java v5.01" /f
REG ADD %KEY%\027 /V 1 /D "%systemdrive%\install\Applications\Java\jre501.exe" /f


REG ADD %KEY%\030 /VE /D "Macromedia Flash Player v7.0" /f
REG ADD %KEY%\030 /V 1 /D "%systemdrive%\Install\Applications\Flashplayer\flash7.0.14.0.exe /S" /f


REG ADD %KEY%\032 /VE /D "eMule v0.4.5.b" /f
REG ADD %KEY%\032 /V 1 /D "%systemdrive%\Install\Applications\eMule\eMule0.45b-Installer.exe /S" /f


REG ADD %KEY%\035 /VE /D "K-Lite Mega Codec Pack v1.20" /f
REG ADD %KEY%\035 /V 1 /D "%systemdrive%\install\Applications\KLite\klmcodec120.exe /silent /loadinf=".\silent.inf"" /f


REG ADD %KEY%\037 /VE /D "PowerDVD v6.0" /f
REG ADD %KEY%\037 /V 1 /D "%systemdrive%\install\Applications\PowerDVD\Setup.exe –s" /f


REG ADD %KEY%\040 /VE /D "Windows Mediaplayer 10" /f
REG ADD %KEY%\040 /V 1 /D "%systemdrive%\install\Applications\Mediaplayer\Mp10Setup.exe /Q:A /R:N" /f


REG ADD %KEY%\042 /VE /D "Winamp v5.8" /f
REG ADD %KEY%\042 /V 1 /D "%systemdrive%\install\Applications\Winamp\Winamp5.08.msi Xaudio=1 Xvideo=0 Xagent=0 XDesktop=0 XMODERNSKIN=1 Xuser=winamp XKey=75083588 /qn" /f


REG ADD %KEY%\045 /VE /D "Nero Burning Rom v6.6.0.8" /f
REG ADD %KEY%\045 /V 1 /D "%systemdrive%\install\Applications\Nero\Nero-6.6.0.8.exe /silent /noreboot /no_ui /sn=1A23-0009-1030-2219-1981-5408 /write_sn" /f


REG ADD %KEY%\047 /VE /D "AnyDVD v4.5.8.1" /f
REG ADD %KEY%\047 /V 1 /D "%systemdrive%\Install\Applications\AnyDVD\AnyDVD_v4.5.8.1.exe /S" /f
REG ADD %KEY%\047 /V 2 /D "REGEDIT /S %systemdrive%\install\Applications\AnyDVD\AnyDVD_v4.5.8.1.reg" /f


REG ADD %KEY%\050 /VE /D "DVD Shrink 3.17" /f
REG ADD %KEY%\050 /V 1 /D "%systemdrive%\Install\Applications\DVDShrink\dvdshrink32setup.exe /silent" /f


REG ADD %KEY%\052 /VE /D "DVD Decrypter v3.5.2.0" /f
REG ADD %KEY%\052 /V 1 /D "%systemdrive%\Install\Applications\DVDDecrypter\DVDDecrypter_v3.5.2.0.exe /S" /f


REG ADD %KEY%\055 /VE /D "WinRAR v3.40" /f
REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\Applications\Winrar\wrar340.exe /s" /f


REG ADD %KEY%\057 /VE /D "Diskkeeper v8.0" /f
REG ADD %KEY%\057 /V 1 /D "%systemdrive%\install\Applications\Diskkeeper\Diskeeper_Server_Enterprise_Edition_v8.0.exe /S /V/QN" /f


REG ADD %KEY%\060 /VE /D "Crap Cleaner v1.17.94" /f
REG ADD %KEY%\060 /V 1 /D "%systemdrive%\Install\Applications\CrapCleaner\ccsetup117.exe /S" /f


REG ADD %KEY%\062 /VE /D "XP-AntiSpy v3.93" /f
REG ADD %KEY%\062 /V 1 /D "%systemdrive%\install\Applications\XP-AntiSpy\xp-AntiSpy_setup-english.exe /S" /f


REG ADD %KEY%\065 /VE /D "ASPI drivers v4.72" /f
REG ADD %KEY%\065 /V 1 /D "%systemdrive%\Install\Applications\aspi\aspiinst.exe /silent" /f

REG ADD %KEY%\067 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\067 /V 1 /D "%systemdrive%\Install\CleanUp.cmd" /f

EXIT

CleanUp.cmd

cmdow @ /HID

shutdown.exe -r -f -t 180 -c "Windows XP will now restart in 3 minutes..."

net user aspnet /delete

del /S /F /Q %systemdrive%\My Shared Folder

REM Deleting install folders
RD /S /Q "%systemdrive%\drivers"
RD /S /Q "%systemdrive%\Install"
RD /S /Q "%systemdrive%\uninstall"
RD /S /Q "%systemdrive%\DP"

REM Delete shortcuts from all user's desktop
DEL "%AllUsersProfile%\Bureaublad\AnyDVD.lnk"
DEL "%AllUsersProfile%\Bureaublad\CyberLink PowerDVD.lnk"
DEL "%AllUsersProfile%\Bureaublad\Mozilla Firefox.lnk"
DEL "%AllUsersProfile%\Bureaublad\Nero StartSmart.lnk"

REM Delete shortcuts from all all user's Start menu
DEL "%AllUsersProfile%\Menu Start\Programmatoegang en -instellingen.lnk"
DEL "%AllUsersProfile%\Menu Start\Windows Update.lnk"
DEL "%AllUsersProfile%\Menu Start\Windows-catalogus.lnk"

DEL "%AllUsersProfile%\Menu Start\Programma's\Adobe Reader 6.0.3.lnk"
DEL "%AllUsersProfile%\Menu Start\Programma's\Executive Software Diskeeper.lnk"
DEL "%AllUsersProfile%\Menu Start\Programma's\MSN Messenger 7.0.lnk"
DEL "%AllUsersProfile%\Menu Start\Programma's\Windows Messenger.lnk"
DEL "%AllUsersProfile%\Menu Start\Programma's\Windows Movie Maker.lnk"

REM Delete shortcuts from current user's desktop
DEL "%UserProfile%\Bureaublad\CCleaner.lnk"
DEL "%UserProfile%\Bureaublad\DVD Decrypter.lnk"
DEL "%UserProfile%\Bureaublad\DVD Shrink 3.2.lnk"
DEL "%UserProfile%\Bureaublad\Opera.lnk"
DEL "%UserProfile%\Bureaublad\xp-AntiSpy.lnk"

REM Delete shortcuts from current user's Start menu
DEL "%UserProfile%\Menu Start\Programma's\Hulp op afstand.lnk"
DEL "%UserProfile%\Menu Start\Programma's\Internet Explorer.lnk"
DEL "%UserProfile%\Menu Start\Programma's\Outlook Express.lnk"
DEL "%UserProfile%\Menu Start\Programma's\Uninstall.lnk"
DEL "%UserProfile%\Menu Start\Programma's\Website.lnk"
DEL "%UserProfile%\Menu Start\Programma's\Windows Media Player.lnk'
DEL "%UserProfile%\Menu Start\Programma's\xp-AntiSpy.lnk"

EXIT

Link to comment
Share on other sites


Troubles getting CleanUp.cmd running propperly

Problem:

I have tried to get my CleanUp.cmd running after my unattended windows,

drivers and applications install.

Somehow all works out fine, but the CleanUp.cmd does not do it' s job propperly.

After a succesfull install of windows, drivers and applications, the CleanUp.cmd

does not start.

When I manually klick the *.cmd, all gets cleaned as it should.

Tried several things, but nothing would make it run automatically.

This may seem very strange but i had the same problem, so i experimented and moved the shutdown command from the beginning to near the end of the instruction list and it now works :crazy: and you only need a 60 sec timer, 3 mins is kinda long especially as the instruction will now be near the end, not at the beginning.

Link to comment
Share on other sites

it is not running - because it gets deleted before getting run...

When you run this command

RD /S /Q "%systemdrive%\Install"

it kills the rest of the cleanup.cmd file, because it just got deleted.

Move this to the end!

Link to comment
Share on other sites

it is not running - because it gets deleted before getting run...

When you run this command

RD /S /Q "%systemdrive%\Install"

it kills the rest of the cleanup.cmd file, because it just got deleted. 

Move this to the end!

Yep. I bet you are bang-on there WwTIPPYwW. Move this command to the end of the script or, better yet, move the whole script onto the DVD. :thumbup

Link to comment
Share on other sites

Again, thx for all the feedback!!

Tomorrow I will test to see what will solve the issue;)

I already read some info that could very well be the

solution to my prob.

One last thing: My "cmdlines.txt" contains this text:

[COMMANDS]
"RunOnceEx.cmd"

Is that ok?

I played aroud a bit and now I am not too sure if this is the correct way to put it?

The "cmdlines.txt" resides in the $OEM$ folder of my UXPCD, together with my "RunOnceEx.cmd".

Link to comment
Share on other sites

Again, thx for all the feedback!!

Tomorrow I will test to see what will solve the issue;)

I already read some info that could very well be the

solution to my prob.

One last thing: My "cmdlines.txt" contains this text:

[COMMANDS]
"RunOnceEx.cmd"

Is that ok?

I played aroud a bit and now I am not too sure if this is the correct way to put it?

The "cmdlines.txt" resides in the $OEM$ folder of my UXPCD, together with my "RunOnceEx.cmd".

ur correct :yes:

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