Jump to content

cleanup.cmd trouble


Recommended Posts

I am having trouble getting my cleanup.cmd to work. I have not been able to get it to work - no matter where i put it either. I'm sure it's something simple but, I've read so many posts looking for the answer that i think i'm getting an aneurism! Here is my configs...

Winnt.sif

[setup Params]UserExecute = "%systemdrive%\install\tweaks.cmd"

[Guirunonce]

%systemdrive%\install\bootlogo.cmd

Command0=%SYSTEMDRIVE%\DP\S\Sound_Control_Panels.cmd

%systemdrive%\install\start.cmd

My start.cmd file is merely this:

cmdow.exe @ /HD

start /wait %systemdrive%\install\wpi\WPI.cmd

EXIT

Tweaks.cmd is just the reg tweaks for my system - should not be a problem as i run them first at the T-9 portion of the install using the [setup Params]

Lastly, My cleanup.cmd file;

cmdow @ /HD

net user aspnet /delete

reg delete /S "hkcu\software\microsoft\internet explorer\styles"

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

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

EXIT

I Run my cleanup.cmd from the WPI.cmd using the order of 999 to make sure it runs last but, It does not remove anything from the drive. Anyone see anything wrong with this? Or am i doing things in the wrong order? or the wrong way?

Link to comment
Share on other sites


As i read somewhere the commands in the GuiRunOnce sections are not handeled in any particular order. Mabe I'm wrong, but why don't you put the cleanup.cmd in the wpi.cmd as it is in the example wpi.cmd? Could be that it works then.

cu

FuNKeR

Link to comment
Share on other sites

Got this from MSDN site.....

[GuiRunOnce]. You can also launch additional commands during setup using the [GuiRunOnce] section of an unattended setup answer file. As with cmdlines.txt, this section contains a list of one or more commands that you want Setup to run after the installation is complete. However, in this method, Setup doesn't run the command lines until the first user logs on to the system after Win2K is installed. The [GuiRunOnce] section of an unattended answer file (e.g., unattend.txt) uses the syntax:

[GuiRunOnce]

"command_1"

"command_2"

. . .

"command_x"

Where "command_1" and "command_2" refer to the commands you want Setup to run and the order in which you want Setup to run them.

If any of the applications launched by the commands in the [GuiRunOnce] section cause a reboot, you should determine whether the application can be launched in a way that suppresses the system reboot (e.g., through a special command-line switch). Otherwise, if the system reboots, Setup automatically removes all the commands in the [GuiRunOnce] section and the remaining commands won't run. If any of the applications [GuiRunOnce] runs require the presence of the Microsoft Windows Explorer shell, they will fail because [GuiRunOnce] runs these commands before Explorer is present. If you can't address either of these problems for an application, consider using a different method to deploy the application

I'm going to try to use the ordering system to run cleanup.cmd from here......

Link to comment
Share on other sites

question borq

why dont u run it from runonceEX.cmd?

use RunonceEX.cmd to call wpi.exe i use a modified version of wpi.cmd

in wpi. u hv a cleanup.cmd in your 999 order. :yes:

Well Asta,

Mostly because I'm a bit confused on how to figure out runonceEX.cmd! I look at the examples and just start to shudder! LOL....I'm fairly familiar with batch Files and Dos Commands so I guess I'm more in my comfort zone without trying it.

Link to comment
Share on other sites

cmdow @ /HID

@ECHO OFF

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

REG ADD %KEY%\001 /V 1 /D "%systemdrive%\WPI\WPI.cmd" /f

EXIT

[COMMANDS]

"REGEDIT /S tweaks.reg"

"RunonceEX.cmd"

prog[pn]=['Cleanup.exe']

desc[pn]=['Post Install Cleanup Removing Temporary Files and All Irrelevant objects']

ordr[pn]=[999]

cmd1[pn]=['%cdrom%\\Software\\cleanup.cmd']

rega[pn]=['%cdrom%\\Software\\cleanup.reg']

dflt[pn]=['yes']

cat[pn]=['Execute']

pn++

Link to comment
Share on other sites

i was more talking about practically. I know that runonceex.cmd runs after you boot it back up and cmdlines.tx is before that. I was mainly curious as to what sort of issues occur from one or the other. I've found enough information on what sort of programs prefer both startup methods but i was wondering if any issues with WPI cropped up.

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