If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Exiting to original DOS prompt?
Donald G. Davis wrote:
Since I upgraded from Win3.1 to Win98 years ago . . . I usually shut down from the command prompt with the following DOSKEY macro: : doskey quit=rundll32.exe shell32.dll,SHExitWindowsEx 1 or you could use: RUNDLL.EXE user.exe,exitwindows |
#2
|
|||
|
|||
Try the W95 form - since ATX boards didn't exist in that era, it might not
invoke the power down. RUNDLL USER.EXE,ExitWindows -- Jeff RichardsMS MVP (Windows - Shell/User) "Donald G. Davis" wrote in message ... Since I upgraded from Win3.1 to Win98 years ago, I have been starting Windows by going first to the command prompt, with personalized CONFIG.SYS and AUTOEXEC.BAT, starting Windows with a batch file that unloads some drivers and TSRs that are not Windows-compatible. I usually shut down from the command prompt with the following DOSKEY macro: : doskey quit=rundll32.exe shell32.dll,SHExitWindowsEx 1 In the past, this would permit the shutdown code in my Windows- starting batch file to execute, reinstalling the DOS TSRs and returning to the original DOS prompt. However, I recently got newer computers and cloned the system to them. When these are shut down that way, instead of returning to the DOS prompt, the power switches off. The BIOS seems to have no provision for turning off this power-off shutdown. I find that I can get an approximation of the desired shutdown by placing the code from the shutdown part of my Windows-running batch file into DOSSTART.BAT and quitting Windows by clicking Start Shutdown Restart in MS-DOS mode. However, this doesn't seem to have a command-line equivalent using the above RUNDLL32 function. Does anyone know a way to restart in MS-DOS mode via a command (or stop Windows from switching off power on shutdown)? -- --Donald Davis [To respond by e-mail, remove "blackhole." from the address.] |
#3
|
|||
|
|||
I'm not familiar with the procedures you're using, but I would assume
that the newer systems are behaving the way they are because that's what an ACPI system does when told to "Shut Down" (which is what that command you're using does.) See http://support.microsoft.com/default...b;en-us;234216 I don't know that there's any way to change that except to disable ACPI in the BIOS or in Windows Device Manager. Is there some reason you prefer booting to a DOS prompt and from there into Windows, instead of directly into Windows? Conversely, is there a reason you prefer dropping into DOS mode instead of shutting down, or using "Restart in MS_DOS Mode"? What you are doing isn't generally "supported" in Win98, neither starting Windows from DOS or using the shell32.dll method for turning off Windows but remaining in DOS. -- Gary S. Terhune MS MVP Shell/User http://www.grystmill.com/articles/cleanboot.htm http://www.grystmill.com/articles/security.htm "Donald G. Davis" wrote in message ... Since I upgraded from Win3.1 to Win98 years ago, I have been starting Windows by going first to the command prompt, with personalized CONFIG.SYS and AUTOEXEC.BAT, starting Windows with a batch file that unloads some drivers and TSRs that are not Windows-compatible. I usually shut down from the command prompt with the following DOSKEY macro: : doskey quit=rundll32.exe shell32.dll,SHExitWindowsEx 1 In the past, this would permit the shutdown code in my Windows- starting batch file to execute, reinstalling the DOS TSRs and returning to the original DOS prompt. However, I recently got newer computers and cloned the system to them. When these are shut down that way, instead of returning to the DOS prompt, the power switches off. The BIOS seems to have no provision for turning off this power-off shutdown. I find that I can get an approximation of the desired shutdown by placing the code from the shutdown part of my Windows-running batch file into DOSSTART.BAT and quitting Windows by clicking Start Shutdown Restart in MS-DOS mode. However, this doesn't seem to have a command-line equivalent using the above RUNDLL32 function. Does anyone know a way to restart in MS-DOS mode via a command (or stop Windows from switching off power on shutdown)? -- --Donald Davis [To respond by e-mail, remove "blackhole." from the address.] |
#4
|
|||
|
|||
Try it twice (NT needs that).
-- Jeff Richards MS MVP (Windows - Shell/User) "Donald G. Davis" wrote in message ... "Jeff Richards" writes: Try the W95 form - since ATX boards didn't exist in that era, it might not invoke the power down. RUNDLL USER.EXE,ExitWindows I'd already attempted that--it returns to the prompt without result. |
#5
|
|||
|
|||
Description of Restarting Computer in MS-DOS Mode
http://support.microsoft.com/default...b;en-us;138996 "When you restart your computer by choosing the "Restart the computer in MS-DOS mode" option in the Shut Down Windows dialog box, Windows closes all running programs, removes itself from memory, and then starts a real- mode command prompt. If the Use Current MS-DOS Configuration option is selected in the "Exit to DOS.pif" file that is used to restart the computer in MS-DOS mode, the Dosstart.bat file in the Windows folder is processed. If the Specify A New MS-DOS Configuration option is selected, the Config.sys and Autoexec.bat files listed in the "Exit to DOS.pif" file are used instead of the Config.sys and Autoexec.bat files in the root folder. "To restart Windows normally after restarting the computer in MS-DOS mode, type exit at the command prompt and then press ENTER." Seems to me you could use a customized "Exit to DOS.pif" file instead of a macro to restart the system in DOS Mode. Just remember to use EXIT command to restart Windows the way it was after a DOS session. If you instead decide to shut down from DOS Mode, there's problems involved in shutting down a system directly while in that environment (or rather, problems starting up again.) You would want to study what's done in order to remove the WOS files and restore the originals. Probably create a BAT file to do those chores. You *are* only talking about Windows 98 and earlier, right? -- Gary S. Terhune MS MVP Shell/User http://www.grystmill.com/articles/cleanboot.htm http://www.grystmill.com/articles/security.htm "Donald G. Davis" wrote in message ... Newsgroups: microsoft.public.win98.gen_discussion Subject: Exiting to original DOS prompt? References: From: Donald G. Davis X-No-Archive: Yes "Gary S. Terhune" writes: I'm not familiar with the procedures you're using, but I would assume that the newer systems are behaving the way they are because that's what an ACPI system does when told to "Shut Down" (which is what that command you're using does.) See http://support.microsoft.com/default...b;en-us;234216 I don't know that there's any way to change that except to disable ACPI in the BIOS or in Windows Device Manager. ACPI is already disabled in the BIOS setup, but this only covers behavior when the power button is pressed. The other BIOS power management options only cover timing of IDE drive and monitor shutdowns, not total power turnoff. I can't find any reference to ACPI in Device Manager. The closest thing seemed to be "Intel 82371EB Power Management Controller," which I tried disabling, but the power still switches off after Windows shuts down. Is there some reason you prefer booting to a DOS prompt and from there into Windows, instead of directly into Windows? Yes indeed; three major reasons. First, I load a couple of dozen drivers and TSRs that I want to be effective in configuring the same environment for multiple simultaneous DOS sessions under Windows. Second, if something happens that prevents Windows from starting, I still have a useful operating system from which to investigate problems--and the fact that DOS still runs (or doesn't) gives some information on the nature of possible system problems. Third, I still do a lot in DOS programs, and it takes much less startup time to get to the DOS prompt and stop there than to boot all the way to Windows if I don't have anything that requires Windows at the time. Conversely, is there a reason you prefer dropping into DOS mode instead of shutting down, or using "Restart in MS_DOS Mode"? What you are doing isn't generally "supported" in Win98, neither starting Windows from DOS or using the shell32.dll method for turning off Windows but remaining in DOS. I have never had any problem starting Win98 from DOS--that works just as it did for Win3.1. In addition to the above, I have several reasons for maintaining that method, which boil down to versatility. I may realize I've forgotten to do something in Windows after I've shut it down, and if I'm back at the DOS prompt, Windows will restart faster than if I need to reboot completely. Or I may be able to do the forgotten task directly in DOS, without having to reboot and restart Windows. There are also certain maintenance tasks, such as cloning partitions with Ghost, that I prefer to do from DOS to avoid possible issues with Windows files being in active use. And at least one command I occasionally use, UNDELETE, can only be run in real-mode DOS, and it's better to run that before a reboot may have overwritten deleted files. Restarting in MS-DOS mode is thus far the only workaround I've found, and I'll make that my default exit mode if I don't find any more direct way to stop Windows from turning off the power after a normal exit. But I prefer to be able to exit Windows simply by entering my QUIT macro invoking RUNDLL32 at the command prompt. That is why I asked if there was a command-line equivalent of the GUI mouse-click "Restart in MS-DOS Mode" Start menu option. -- --Donald Davis [To respond by e-mail, remove "blackhole." from the address.] |
#6
|
|||
|
|||
"Donald G. Davis" wrote in message
... There are also certain maintenance tasks, such as cloning partitions with Ghost, that I prefer to do from DOS to avoid possible issues with Windows files being in active use. Ghost is a DOS app although it has a few things you can do in Windows, one of them being using Ghost Explorer to add a file to an image or extract a file from an image. Yet AFAIK, DOS is the only place you can create and/or clone an image. When you start Ghost in windows, select backup/restore/clone, step thru the interactive user settings and then select Ghost to run the operation. Ghost first warns you that it's about to run, it will shut down any running apps if you did not do so and info may be lost on those apps, This gives the user the chance to save/shutdown the apps themselves, it then shuts down and boots to DOS to run the operation. Once the operation is finished it reboots to Windows unless -fx is used in it's command line which boots it back to DOS after operation completion. -- Brian A. Conflicts start where information lacks. http://www.dts-l.org/goodpost.htm |
#7
|
|||
|
|||
"Donald G. Davis" wrote in message
... "Gary S. Terhune" writes: Seems to me you could use a customized "Exit to DOS.pif" file instead of a macro to restart the system in DOS Mode. Just remember to use EXIT command to restart Windows the way it was after a DOS session. If you instead decide to shut down from DOS Mode, there's problems involved in shutting down a system directly while in that environment (or rather, problems starting up again.) You would want to study what's done in order to remove the WOS files and restore the originals. Probably create a BAT file to do those chores. You *are* only talking about Windows 98 and earlier, right? Yes, Win9x (98SE specifically). I had already tried turning off the machine from the prompt reached by "Restart in MS-DOS mode," and had not seen any noticeable problems. I had apparently not configured it in the way that would create .WOS files--there are none on my system. However, I was told in alt.msdos.batch of a far simpler solution that prevents the normal Windows shutdown from turning off the power: a tiny TSR, NOOFF.COM (found at http://home.arcor.de/g.s/dostools.htm) which can be loaded in AUTOEXEC.BAT and uses a BIOS power-management call to disable the undesired power-off. That seems the perfect solution for me. Yeah, that does sound like the best answer. The .WOS files disappear when you return to Windows, and from my reading of the article, they aren't created at all unless you "specify new" config files to be used. -- Gary S. Terhune MS MVP Shell/User http://www.grystmill.com/articles/cleanboot.htm http://www.grystmill.com/articles/security.htm |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
STUCK AT COMMAND PROMPT | BANSHEE | General | 5 | January 27th 05 10:11 PM |
New User causes original User dump | Old Nick | Setup & Installation | 2 | July 8th 04 07:07 AM |
Windows 98 Installation/boot original disk | Graham | Setup & Installation | 2 | July 1st 04 10:22 PM |
Command Prompt | Katira | General | 5 | June 12th 04 12:41 PM |
close the ms-dos prompt box | glee | Software & Applications | 1 | May 7th 04 04:06 AM |