TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Dan Larson
date: 1994-12-31 18:20:26
subject: WINSHUTDOWN & REBOOT

Where I work we have 60+ servers connected to an array of
Cybex switch boxes. Ocassionally one or two servers will loose
access to the keyboard and mouse through the Cybex box.  The server
is still healthy and running fine, but just can't get connected
to the keyboard or mouse again without being powered off.  The trouble is
that with the keyboard and mouse gone there is no way to run a proper
shutdown so CHKDSK must be run before the server can be rebooted.
This takes way too long and can result in an occasional corrupted file.
Just because the keyboard and mouse connections are gone....

The solution I want to acheive is to write a small program that
runs in the background on each server.  I could send a command to it
via NETBIOS or a named pipe.  This would allow me the at least
do a proper shutdown of the server from a remote workstation.

The question I have then is:

Can anyone show me the proper way to call WinShutdown, wait for
it to finish then reboot the machine?

It must be reasonably simple to do, but I have had no luck getting
WinShutdown() to work, nor the code I've seen around for using DosDevIOCtl
to call the DOS$ device (which seems to be written for the 1.3 toolkit
because the prototypes warnings I get tell me so.).

I am using CSet++ 2.1 on OS/2 2.1 / 2.11 & LS 3.0

Thanks in advance for your help.

___
 * MR/2 1.52 NR * SYNTAX?  Why not--they tax everything else!

--- WILDMAIL!/WC v4.11 
* Origin: Freezing Point BBS - WDNet HQ - Mpls MN: (1:282/85.0)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1
@PATH: 282/85 1 270/101 396/1 3615/50 229/2 12/2442 711/409 808 809 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™.