Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Shutdown Command to use in DOS  (Read 15847 times)

0 Members and 1 Guest are viewing this topic.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Shutdown Command to use in DOS
« 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)
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #1 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.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #2 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)

Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #3 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.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #4 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)
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #5 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.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #6 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)
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #7 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!
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #8 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
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Shutdown Command to use in DOS
« Reply #9 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?

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #10 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.
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #11 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).
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheShadow

    Topic Starter


    Hopeful

  • Retiree in Florida
  • Thanked: 13
    • Yes
    • The Doctor
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows XP
Re: Shutdown Command to use in DOS
« Reply #12 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)
Experience is truly the best teacher.
Backup! Backup! Backup!  Ghost Rocks!

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Shutdown Command to use in DOS
« Reply #13 on: April 29, 2009, 07:29:58 PM »
" Anyone who goes to a psychiatrist should have his head examined. "

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Shutdown Command to use in DOS
« Reply #14 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.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.