Computer Hope

Microsoft => Microsoft DOS => Topic started by: TheShadow on April 29, 2009, 03:54:53 PM

Title: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 03:54:53 PM
I run Ghost 2003 from a DOS boot disk.
I can make the program end and return me to a DOS prompt when the backup is complete,
but I can't figure out how to turn OFF the PC, from the batch file that ran Ghost.

Is there an external command written for DOS that I can call to shut down the PC.

I want to start my Ghost backup and then go on to bed, knowing that the computer will be shut off when the Ghost backup is complete.

This is on a ATX style PC, with an ATX power supply.

Some help would be greatly appreciated.

The Shadow  8)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 03:56:28 PM
I run Ghost 2003 from a DOS boot disk.
I can make the program end and return me to a DOS prompt when the backup is complete,
but I can't figure out how to turn OFF the PC, from the batch file that ran Ghost.

Is there an external command written for DOS that I can call to shut down the PC.

I want to start my Ghost backup and then go on to bed, knowing that the computer will be shut off when the Ghost backup is complete.

Some help would be greatly appreciated.

The Shadow  8)
Type shutdown /? at the command prompt. If the program you are using might become unresponsive when the shutdown is executed, use the -f switch.
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 04:02:10 PM
That Shutdown.exe command is in Windows.
Windows is NOT being used in this application.

DOS, I said DOS! 
I'm booting with a Floppy Disk to MS-DOS and windows does not enter into it anywhere.

Surely, someone out there has written a little .exe or .com program to shut down an ATX PC.

 8)

Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 04:12:19 PM
That Shutdown.exe command is in Windows.
Windows is NOT being used in this application.

DOS, I said DOS! 
I'm booting with a Floppy Disk to MS-DOS and windows does not enter into it anywhere.

Surely, someone out there has written a little .exe or .com program to shut down an ATX PC.

 8)


Ok. Most people confuse DOS with CMD, so I was doing a logical assumption, which most people would have done as well.
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 04:16:49 PM
Yeah, I know......I didn't mean to get on your case.

I just wanted to let anyone reading this, that Windows doesn't enter into this operation anywhere.

I could even be backing up a data storage partition where there is NO OS at all.

Everything has to happen from my little Dos boot floppy.

Well, that's what I'd like to do anyway.  ;) ;D ;D ;D

Shadow  8)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 04:20:43 PM
Yeah, I know......I didn't mean to get on your case.

I just wanted to let anyone reading this, that Windows doesn't enter into this operation anywhere.

I could even be backing up a data storage partition where there is NO OS at all.

Everything has to happen from my little Dos boot floppy.

Well, that's what I'd like to do anyway.  ;) ;D ;D ;D

Shadow  8)
Ok...without the shutdown command, I have no idea how one could shutdown automatically. Can you add files to your floppy, if you can, add shutdown.exe and run it when booting in DOS.
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 04:32:31 PM
WELL, Shutdown.exe is only 19K, but I really don't have that much space left on the old Floppy Disk,
that is, without removing something else.

I'm working on a workaround that may work, if it works.  ;) ;D ;D ;D ;D ;D

Thanks for your help!

The Shadow  8)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 04:34:00 PM
WELL, Shutdown.exe is only 19K, but I really don't have that much space left on the old Floppy Disk,
that is, without removing something else.

I'm working on a workaround that may work, if it works.  ;) ;D ;D ;D ;D ;D

Thanks for your help!

The Shadow  8)

OK, No problem!
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 05:29:05 PM
Just to prevent anyone else from having to go through all the work I just went through with that Shutdown.exe command.

I did put it on a DOS Boot Disk and tried to run it and I got the error message that the command cannot be run in DOS.  (kinda, what I expected)
Apparently, it can ONLY be run from within windows.

Cheers Mates,
Shadow
Title: Re: Shutdown Command to use in DOS
Post by: Geek-9pm on April 29, 2009, 05:42:00 PM
Hey shadow.
Two things. Three.
What version of DOS? Is it Caldera?
I believe the GHOST can be put on a CD.
Will it run in any other version of DOS?
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 06:10:23 PM
I thought I said "MS DOS" but maybe not.
The floppy was originally formatted on a Windows ME machine, so I guess you could say it's
Windows ME DOS, directly from Microsoft.

I keep using it, because it has some neat little features that DR-DOS or even Windows 98 DOS don't have.

The "Shutdown.exe" program from Windows Xp WILL NOT run from a dos boot disk.
It only runs in Windows.  So the CD doesn't even enter into the program.

Yes I have my Ghost 2003 program on a CD, Flash Drive and even a SD Flash Memory Card.

If the program won't run in DOS, where it might or might not fit is redundant.

I'm still looking for a real DOS Shutdown program.

Reboot programs have been around forever, but I don't remember seeing a DOS Shutdown program. 

Still looking!!!!

Shadow  8)

By the way, Ghost32.exe (Ghost 11.5) will run from the XP or Vista desktop and can also be run from a batch file, like this:

Ghost32.exe -FX
%windir%\System32\shutdown.exe -s -t 01 -f

The -FX after Ghost, makes Ghost shutdown when the backup is complete,
then the next line shuts down the computer.

That second line is the same one that I use to shut down my PC at the end of the day.
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 06:12:29 PM
I thought I said "MS DOS" but maybe not.
The floppy was originally formatted on a Windows ME machine, so I guess you could say it's
Windows ME DOS, directly from Microsoft.

I keep using it, because it has some neat little features that DR-DOS or even Windows 98 DOS don't have.

The "Shutdown.exe" program from Windows Xp WILL NOT run from a dos boot disk.
It only runs in Windows.  So the CD doesn't even enter into the program.

Yes I have my Ghost 2003 program on a CD, Flash Drive and even a SD Flash Memory Card.

If the program won't run in DOS, where it might or might not fit is redundant.

I'm still looking for a real DOS Shutdown program.

Reboot programs have been around forever, but I don't remember seeing a DOS Shutdown program. 

Still looking!!!!

Shadow  8)

By the way, Ghost32.exe (Ghost 11.5) will run from the XP or Vista desktop and can also be run from a batch file, like this:

Ghost32.exe -FX
%windir%\System32\shutdown.exe -s -t 01 -f

The -FX after Ghost, makes Ghost shutdown when the backup is complete,
then the next line shuts down the computer.

That second line is the same one that I use to shut down my PC at the end of the day.
The -f is just insurance that your computer actually WILL shutdown (incase of unresponsive programs).
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 06:24:09 PM
Yes, I know that.

-f stands for FORCE SHUTDOWN.

I've been using that shutdown shortcut for years and have shared it with all my friends and customers (hundreds! )

It also works just fine on Windows Vista and Win-7.

Thanks for all your responses,
Shadow  8)
Title: Re: Shutdown Command to use in DOS
Post by: patio on April 29, 2009, 07:29:58 PM
http://forum.doom9.org/archive/index.php/t-106008.html (http://forum.doom9.org/archive/index.php/t-106008.html)

Howdy Shadow...... ;)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 07:31:07 PM
Yes, I know that.

-f stands for FORCE SHUTDOWN.

I've been using that shutdown shortcut for years and have shared it with all my friends and customers (hundreds! )

It also works just fine on Windows Vista and Win-7.

Thanks for all your responses,
Shadow  8)
I was just saying that because Ghost 2003 was set to close, so you probably wouldn't need to add it...although I recommend adding

ping localhost -n 1 -w 1000 > nul

between closing and shutting down because it might take a moment for it to close.
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 08:06:14 PM
I don't see how that enters into the mix at all.

If I'm trying to shut down my PC in DOS, why would I want to try to ping something?

Anyway, my Software Guru came thru for me and I have just downloaded the "Shutdown.com" program in a zip file, along with full documentation.

I'll only post the link when I've had time to fully test the program.

Thanks all!

Shadow  8)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 08:09:54 PM
I don't see how that enters into the mix at all.

If I'm trying to shut down my PC in DOS, why would I want to try to ping something?

Anyway, my Software Guru came thru for me and I have just downloaded the "Shutdown.com" program in a zip file, along with full documentation.

I'll only post the link when I've had time to fully test the program.

Thanks all!

Shadow  8)
The ping makes the batch wait for one second before continuing...just incase your program takes a bit of time to close.
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 08:39:31 PM
Well, I just finished testing the DOS Shutdown program and it works a treat.

I'll post the link when I have more time to upload the zip file to my FTP Server. 
Probably tomorrow.

Shadow 8)
Title: Re: Shutdown Command to use in DOS
Post by: Helpmeh on April 29, 2009, 08:41:09 PM
Well, I just finished testing the DOS Shutdown program and it works a treat.

I'll post the link when I have more time to upload the zip file to my FTP Server. 
Probably tomorrow.

Shadow 8)
You can just upload the zip here...
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 29, 2009, 09:12:23 PM
Well, I just cleaned up the Instruction text file and re-compressed the files into a self extracting zip file, using 7Zip.

The file "Shutdown DOS.exe" can be downloaded here:

http://www.box.net/shared/fcc6cam8x8

I thank everyone who has tried to help me with this little problem.

Cheers Mates!

Shadow  8)

Title: Re: Shutdown Command to use in DOS
Post by: patio on April 29, 2009, 09:13:33 PM
Thanx again Shadow !
Title: Re: Shutdown Command to use in DOS
Post by: Geek-9pm on April 30, 2009, 09:58:59 AM
Did Shadow ever consider a hybrid method?
Perhaps Hardware modification and a small bit of software to force a machine to shut down could do the job.  :P
Title: Re: Shutdown Command to use in DOS
Post by: TheShadow on April 30, 2009, 04:09:53 PM
The DOS Shutdown.com program works a treat.  Nothing else is required.

Try it.........you'll like it.