Path: news.cs.au.dk!not-for-mail From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: Reboot Windows via BETA? Date: 18 Feb 1999 09:09:12 +0100 Organization: Mjolner Informatics Lines: 39 Message-ID: References: <79sfni$r6l$1@sun579.rz.ruhr-uni-bochum.de> <7agaks$30e$1@sun579.rz.ruhr-uni-bochum.de> NNTP-Posting-Host: fenris.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 919325351 4828 255.255.255.255 (18 Feb 1999 08:09:11 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 18 Feb 1999 08:09:11 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.cs.au.dk comp.lang.beta:11832 "Sascha Kimmel" writes: > Sascha Kimmel schrieb in Nachricht > 79sfni$r6l$1@sun579.rz.ruhr-uni-bochum.de.../// > >Hi! > > > >I want to have my program restart Windows (yes, ONLY Windows, not MacOS, > Sun > >solaris, Linux etc.) automatically. I found out that I have to use > >"EWX_REBOOT" for that and found the following quite interesting lines in > >winuserconsts.bet (Mjolner System Professional 4.1, Windows 98): We've discussed this problem through email and found the following solution. It only works on windows 95/98. Here's what to do: INCLUDE '~beta/win32lib/v1.6/winuserconsts'; ExitWindowsEx: external (# flags, reserv, result: @Integer; enter (flags, reserv) exit result #); do (EWX_SHUTDOWN, 0) -> ExitWindowsEx; You can also use EWX_LOGOFF and EWX_REBOOT. Make sure you have no DOS boxes running. If you started you beta program from a DOS box, the DOS box needs killing, and windows does not do so. You can check if this is a problem by selecting shutdown through the Start menu: If that produces a dialog stating something like "This program must be shutdown before windows can shutdown", you have a DOS box or something similar running. Regards, -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **