YTHPRGDB@MTUS5.BITNET (01/15/91)
Is there any nice way to prevent your users from recursively running windows? That is, they exit to DOS (via the DOS icon), do something, and leave. Later in the day they come back and see DOS, so they type WIN and run Windows. As Windows doesn't (can't?) tell if it is already running, it let's you do it. But since you're in a Windows DOS Shell, you're really running Windows inside of Windows. The computer runs SO slow it's unbearable. I've tried educating my users about this "phenomena", but in some cases it's like training a dog to play the piano. Any insights would be appreciated!
cpa@monu6.cc.monash.edu.au (Christopher P Avram) (01/15/91)
In article <11057@jpl-devvax.JPL.NASA.GOV> brad@huey.Jpl.Nasa.GOV writes: >In article <91014.153634YTHPRGDB@MTUS5.BITNET>, YTHPRGDB@MTUS5.BITNET writes: >|>Is there any nice way to prevent your users from recursively running windows? >|>... of Windows. The computer runs SO slow it's unbearable. > >Create the batch file WIN.BAT: >------------------------------ >echo off >... >:exit >Brad Hines I have had this problem with other menu programs in another life. The solution then was to write a bat file, a simpler one than Brad's. The Dos EXIT command is a no-operation to the root level command.com shell. So just after you boot EXIT does nothing. But in a command.com shell started by Windows, the EXIT command will terminate the shell and return you to windows. You can use this. Write a batch file with EXIT as the first command, then start windows with the second command. eg: File:w3.bat @Echo off exit win Chris Avram Department of Computer Technology Faculty of Computing and Information Technology Monash University Caulfield Campus PO Box 197 Phone + 61 3 573 2196 Caulfield East Vic 3145 Fax + 61 3 573 2745 AUSTRALIA email cpa@monu6.cc.monash.edu.au
archer@stlvm2.iinus1.ibm.com ("Gary D. Archer") (01/16/91)
Ref: Append to WINDOWS USENET (ARCHER) at 04:18:18 on 91/01/15
I like your idea... but to avoid eating 4K of space for a semaphore
file (or whatever your cluster size is) use:
rem > c:\win-run.now
Instead of :
echo " " > c:\win-run.now
Also, change the echo to tell the user to press ALT-ESC or
CTL-ESC to return to windows (or Task list).
Gary
=========== append follows ===========
Brad Hines writes:
:Create the batch file WIN.BAT:
:=-----------------------------
:echo off
:if exist c:\win-run.now goto :running
:echo " " > c:\win-run.now
:c:\windows\win
:del c:\win-run.now
:goto :exit
::running
:echo Windows is already running
::exit
--
Brad Hines
Internet: brad@huey.jpl.nasa.gov
hans@pine.circa.ufl.edu (Hans van Oostrom) (01/16/91)
In article <11057@jpl-devvax.JPL.NASA.GOV>, brad@huey.Jpl.Nasa.GOV (Brad Hines) writes... > >Create the batch file WIN.BAT: >------------------------------ >echo off >if exist c:\win-run.now goto :running >echo " " > c:\win-run.now >c:\windows\win >del c:\win-run.now >goto :exit >:running >echo Windows is already running >:exit > >-- >Brad Hines Instead of the copy and delete commands it is probably better to do the following: echo off if %winrun%="run" goto running set winrun="run" c:\windows\win set winrun="" goto exit :running echo Windows is running.. :exit If the machine is turned off during the dos session, the file created by the first approach will stay, and windows will never run again... Hans van Oostrom PO Box J-254, JHMHC hans@ufpine (BITNET) Gainesville, FL 32601, USA hans@pine.circa.ufl.edu (INTERNET) >>> Hoe ver je ook gaat, overal zie je landgenoten <<<
hls@rwthbs.uucp (H.L. Stahl) (01/17/91)
In article <11057@jpl-devvax.JPL.NASA.GOV> brad@huey.Jpl.Nasa.GOV writes: > In article <91014.153634YTHPRGDB@MTUS5.BITNET>, YTHPRGDB@MTUS5.BITNET writes: > |> Is there any nice way to prevent your users from recursively running windows? > Create the batch file WIN.BAT: > ------------------------------ > echo off > if exist c:\win-run.now goto :running > echo " " > c:\win-run.now !! c:\windows\win %1 %2 %3 %4 ... ^^^^^^^^^^^ You omitted the parameters !! > ... > Brad Hines Hans-Ludwig Stahl | _ : Hans-Ludwig Stahl, Lehrstuhl fuer Betriebssysteme, RWTH Aachen |_|_`__ : Kopernikusstr. 16, D-5100 Aachen, ..49-(0)241-804374 | |__) : Domain: hls@informatik.rwth-aachen.de |__) : uucp: ...!{seismo,mcvax,uunet}!unido!rwthinf!hls
dan@rna.UUCP (Dan Ts'o) (01/26/91)
In article <91014.153634YTHPRGDB@MTUS5.BITNET> YTHPRGDB@MTUS5.BITNET writes: >Is there any nice way to prevent your users from recursively running windows? >That is, they exit to DOS (via the DOS icon), do something, and leave. Later >in the day they come back and see DOS, so they type WIN and run Windows. As >Windows doesn't (can't?) tell if it is already running, it let's you do it. >But since you're in a Windows DOS Shell, you're really running Windows inside >of Windows. The computer runs SO slow it's unbearable. You can always do the BAT file, lock file game... A lock file, say C:\WINDOWS.LCK A BAT file, WIN.BAT in a directory earlier in the PATH than \WINDOWS. AUTOEXEC.BAT deletes C:\WINDOWS.LCK WIN.BAT tests for C:\WINDOWS.LCK if exists, error message creates C:\WINDOWS.LCK runs WINDOWS deletes C:\WINDOWS.LCK