×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Please What is the sutdown command????

Please What is the sutdown command????

Please What is the sutdown command????

(OP)
ALL I want is the shut down command to shut down the computer, please don't tell me to look in the help as i have already

RE: Please What is the sutdown command????

This isn't as easy as it used to be. Once-upon-a-time you could call Interrupt zero, creating a processor exception, shutting down the machine. With Win9x, it just crashes the machine.

You might try...

WinDir$ = ENVIRON$("windir")
KillWin$ = WinDir$ + "\Rundll.exe User.exe,ExitWindows"
SHELL KillWin$

...but this might be more work than what it is worth. Windows doesn't like to shut down DOS apps automatically and it is likely to prompt you to click okay to close your program and Windows or click Cancel to continue working.

Somebody post here if you know an easy way to do this using BASIC (with or without calls to the ROM BIOS).

RE: Please What is the sutdown command????

Thanks, Toshi. Any thoughts on shutting down or restarting a machine where APM isn't enabled?

RE: Please What is the sutdown command????

Alt255,
  I think your way is the best way for Winxx machines.  
None of the low-level techniques work on the new Windows 32 environment.  The most they do is close the DOS box.  In the WinNT/2K environments, shutting down the computer may be disabled for a given account.  In that case, there's no way to do it, as far as I know.

boot1:
DEF SEG = &H40
POKE &H473, 12 '0000 for cold boot
POKE &H472, 34
DEF SEG = -1: '-1==&HFFFF
CALL ABSOLUTE(0)
END

boot2:
OUT 100, 254

boot3:
SHELL "START"

boot4:
'int 19h using CALL INTERRUPT(&h19,regs,regs)

boot5:
OUT &H64, &H92

RE: Please What is the sutdown command????

As an aside, using a CALL to FFFF:0000 or OUT &H64, &H92/&HFE will cause windows to kill the DOS box, so you could use the RunDLL32 method followed by the old-fashioned method to work -- at least to some extent -- around Windows asking whether you want to kill the DOS window or not.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close