TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dale A Cook
from: Phil Crown
date: 1994-11-01 12:17:42
subject: HELP PLEASE!


 DAC> I need to find an OS/2 utility that will perform a
 DAC> SYSTEM shutdown & reboot from the command line....without prompting
 DAC> for a "YES",etc from the keyboard.

This won't reboot, but I use it to shutdown all the time since I'm running
CMD.EXE as my WPS.  There may be a way to re-boot, but I haven't found it.

Also, anything that is placed after DosShutdown() doesn't get processed, or
at least the printf() statement won't, so just wait a moment for the disk to
stop spinning.  Running cmd.exe as the shell and depending on what I have
open, shutdown takes about 1 - 3 seconds.

#define INCL_DOSFILEMGR
#include 

ULONG            Reserved;      /* Reserved, must be set to zero */
USHORT           rc;            /* return code */
 
main()
{

  printf("\nShutting down... when disk stops spinning it is safe to"
         "\nturn off the computer or perfrom a Ctrl-Alt-Del boot.");

  rc = DosShutdown(Reserved);

}

Phil


--- Blue Wave/Max v2.12 OS/2 [NR]

* Origin: * MacSavvy * Dallas * Mac * OS/2 * (214)250-4479 * (1:124/1208)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 124/1208 1111 1 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.