Jump to content

Getting stuck on cleanup...


Recommended Posts

I'm so close to done with my disc, so this is driving me crazy. When I get to cleanup.cmd most of it runs perfectly, until I get to a point where I call another batch file. I see that batch file open and close and then my cleanup.cmd gets stuck and I have to manually click the X to close it, and nothing below my call to the other batch file is run. Here's the script below, any help would be great.

REM-------------------------------------------------------------------------------------
REM  Setup Firefox Associations
REM-------------------------------------------------------------------------------------
start /wait %systemdrive%\install\Applications\Firefox\Firefox.cmd

REM-------------------------------------------------------------------------------------
REM  Remove unnecessary directories
REM-------------------------------------------------------------------------------------
ATTRIB -R "%systemdrive%\My Shared Folder" /s /d
ATTRIB -R "%systemdrive%\Install" /s /d
ATTRIB -R "%systemdrive%\OfficeTEMP" /s /d
ATTRIB -R "%systemdrive%\McAfee" /s /d

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

REG ADD %KEY% /V TITLE /D "Finishing Cleanup" /f
REG ADD %KEY%\200 /VE /D "Removing installation files" /f
REG ADD %KEY%\200 /V 1 /D "CMD /C RD /S /Q %systemdrive%\Install\" /f
REG ADD %KEY%\200 /V 2 /D "CMD /C RD /S /Q %systemdrive%\OfficeTEMP\" /f
REG ADD %KEY%\200 /V 3 /D "CMD /C RD /S /Q %systemdrive%\McAfee\" /f


shutdown.exe -R -F -T 90 -c "Restarting in 1 minute and 30 seconds"

EXIT

The problem seems to come in after firefox.cmd gets called.

One other question, if I make a batch file with:

shutdown.exe -r -f -t 90 -c "Restarting in 1 minute and 30 seconds"

and open it on the desktop it doesn't work. But if I type it at the command line it works fine. Any ideas?

Thanks.

Link to comment
Share on other sites


have you tried replacing the start /wait bit with

REM-------------------------------------------------------------------------------------
REM  Setup Firefox Associations
REM-------------------------------------------------------------------------------------
CALL %systemdrive%\install\Applications\Firefox\Firefox.cmd

REM----<snip>

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