Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

shutdown.exe question,

Featured Replies

Ok, in my cleanup.cmd file i have the following

ECHO.
ECHO Cleaning up temp files...
RD /S /Q %systemdrive%\install

ECHO.
ECHO Restarting The PC In 1 Minute
start /wait shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

EXIT

This seems to work ok, but the EXIT part..

If i leave the EXIT at the end, shutdown runs, then the dos window closes, and shutdown gets aborted some how.

If i remove the EXIT command

ECHO.
ECHO Cleaning up temp files...
RD /S /Q %systemdrive%\install

ECHO.
ECHO Restarting The PC In 1 Minute
start /wait shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

Shutdown starts, but the dos window behind it stays and exporer doesnt seem to load. Is this suposed to happen? Will this be a problem for all the programs and hotfixes that installed?

When the system restars after, everything "seems" ok. I guess i am just expecting to run shutdown, and during those 60 seconds explorer will load...then shutdown.

Hopefully i'm making sense.. :)

I think its the "this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart! Thats throwing me off perhaps.

remove the /wait

technically, you don't need teh start either. Just shutdown.exe.

You don't want the computer to wait while it's counting donw to shutdown :)

  • Author

ok i removed the start /wait...

But is'nt explorer suposed to fully load before it shuts down?

Sorry the odd question. :)

i suppose not. i think all pending processes will wait (when you add the wait parameter) for the app to end before it continues loading those pending processes/apps (explorer included).

It's sometimes better to let it fully load, that's what the wait period is for.

By having start /wait when you called SHUTDOWN.EXE, it prevented the desltop from loading. Removign it will close teh batch, but SHUTDOWN.EXE should keep running so that the desktop loads fully.

  • Author
It's sometimes better to let it fully load, that's what the wait period is for.

By having start /wait when you called SHUTDOWN.EXE, it prevented the desltop from loading. Removign it will close teh batch, but SHUTDOWN.EXE should keep running so that the desktop loads fully.

ok trying that now in vmware

all i have in there now is

ECHO.
ECHO Cleaning up temp files...
RD /S /Q %systemdrive%\install

ECHO.
ECHO Restarting The PC In 1 Minute
shutdown.exe -r -f -t 70 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

EXIT

  • Author

hmmm same thing happened

Shutdown started, then the dos window colsed...then shutdown aborted.

Could this have something to do with me using vmare?

Or is there something wrong with my file? I removed the cleanup.cmd file and just added it into my main .cmd file run from guirunonce

CLS
@echo off
MODE CON COLS=80 LINES=40
COLOR 0F
TITLE Windows XP SP1 - Unattended Installation

ECHO.
ECHO Over the next few minutes you will see automated installations
ECHO of various sofware applications and registry
ECHO tweaks being implemented. The computer will restart automatically
ECHO once the whole process has finished!

ECHO.
ECHO Importing Reg Tweaks
REGEDIT /S %systemdrive%\apps\regtweaks.reg

ECHO.
ECHO Installing DirectX 9.0b
ECHO Please wait...
start /wait %systemdrive%\install\Applications\DirectX9b\DX9NTopk.exe

ECHO.
ECHO Installing WinRAR 3.3 Plus
ECHO Please wait...
start /wait %systemdrive%\install\Applications\wrar330.exe /s

ECHO.
ECHO Installing Spybot SD v1.3
start /wait %systemdrive%\install\Applications\spybot\spybotsd13.exe /VERYSILENT /NOCANCEL /TASKBARHIDE /AUTOCLOSE

ECHO.
ECHO Installing Nero Burning ROM v6.3.1.6
ECHO Please wait...
start /wait %systemdrive%\install\Applications\nero\nero6316.exe /SN=xxxxxxxxxxxxxxxxxxxxxxxx /WRITE_SN /SILENT /NOREBOOT

ECHO.
ECHO Installing Alcohol 120
ECHO Please wait...
start /wait %systemdrive%\install\Applications\alcohol120\setup.exe /qn Reboot=Suppress

ECHO.
ECHO Reigistering alcohol 120....
REGEDIT /S %systemdrive%\Applications\alcohol120\asoft.reg

ECHO.
ECHO Verifying hotfix installation. Please run qfecheck after reboot to check for proper hotfix installation.
ECHO Please wait...
start /wait %systemdrive%\install\Applications\Q282784.exe -u -q -z

ECHO.
ECHO Installing codecs
start /wait %systemdrive%\install\codecs.cmd

ECHO.
ECHO Registering codec files...
REGEDIT /S %systemdrive%\install\codecs.reg

ECHO.
ECHO Cleaning up temp files...
RD /S /Q %systemdrive%\install

ECHO.
ECHO Restarting The PC In 1 Minute
shutdown.exe -r -f -t 70 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"

EXIT

  • Author

I think it may have something to do with vmware.

I just threw the .cmd file into my startup folder and restarted, and it worked the way its supposed to. Although I dont know if that is really the same..

i know that sometimes progs are still installing and the shut down continues, i decided in mine since i waited sooooo long for the process to complete that i made the wait time 5 minutes to shut down, that gave it PLENTY of time to finish up adn load.

ECHO.

ECHO Restarting the PC in 5 minutes...

shutdown.exe -r -f -t 300 -c "Windows XP Professional Service Pack 2 will restart in 5 minutes, this will give enough time for Windows to update the shell and to fully load before it's ready to restart! Please remain patient, the whole process is almost over."

ECHO.

ECHO Deleting Temp Installation Files...

RD /S /Q %systemdrive%\install

EXIT

  • Author
ECHO.

ECHO Restarting the PC in 5 minutes...

shutdown.exe -r -f -t 300 -c "Windows XP Professional Service Pack 2 will restart in 5 minutes, this will give enough time for Windows to update the shell and to fully load before it's ready to restart! Please remain patient, the whole process is almost over."

ECHO.

ECHO Deleting Temp Installation Files...

RD /S /Q %systemdrive%\install

EXIT

Thanks i think vmware just takes longer to load explorer.

5 mins 2 wait :| im using vmware, i have my shutdown command set for 30seconds, vmware takes about 15 seconds 2 fully load explorer, then another 15 it will shutdown

heres mine

shutdown.exe -r -r -t 30

The problem is that you are cleaning up the files first....so the cleanup.cmd file gets deleted before making it to the next line....the shutdown one.

Sooooooo, either keep your cleanup.cmd file in a different location or issue the shutdown first.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.