Solved

i need a .bat file that exits win98

Posted on 2000-02-23
7
320 Views
Last Modified: 2013-12-28
i need a .bat file that exits win98,
i mean i need a .bat file that could exit and shut down my win98 session, without makeing no clicks! some friend told me to edit and run something like:                
                @exit
but, i did not work please help! my email is desconsiderao@hotmail.com
0
Comment
Question by:alonsolezama
7 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2553094
You can't do that in a .bat file
The @exit only leaves the batch file you are in.
Ther only way to do that is to have a program in your batch file that shutsdown windows.
0
 

Expert Comment

by:zbrusko
ID: 2553108
this probably isn't much of a help, but if you run something like "rundll32.exe /shutdown" or something like this, I believe that will do the trick.  I am not sure exactly what the parameter is though.
0
 

Expert Comment

by:zbrusko
ID: 2553117
Actually, that isn't how you do it, but I do think that it is possible, sorry I couldn't help.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Expert Comment

by:wjakubec
ID: 2553171
Put The EXIT command at the end of the Bat file and the save the file.  Right Click on the file and select properties and click on the program tab.  Check the box that says Close on Exit.  It will close after running the bat file.

Good Luck
0
 
LVL 1

Expert Comment

by:gsoldado
ID: 2553178
Using a text editor (such as Notepad), type the following by itself:
@EXIT
Save the file somewhere on your hard disk - call it whatever you like, as long as it has the extension .bat.
Make a shortcut to the batch file, and place it on your desktop (or wherever you want).
Right-click on the shortcut, select Properties, click the Program tab, and make sure the Close on Exit option is turned on.
Then, click Advanced, and make sure MS-DOS mode is selected, and Warn before entering MS-DOS mode is turned off.
Click Ok twice, and double-click on the icon to use it.
0
 
LVL 25

Accepted Solution

by:
dew_associates earned 50 total points
ID: 2553281
gsoldado, did you read what alonsolezama posted, he tried that and it didn't work. By the way, we do observe a protocol on this site as to how and when to post answers, one of which is not to block questions with answers that are speculative as an example. Also, questioners can accept comments as answers, so in situations such as this, it would have been prudent to do that until the questioner found something that worked.

Alonsolezama, here are the various parameters you can use with Windows 98 or 98SE:

You can use either of the following commands in a batch file to restart Windows 98 automatically:
 
runonce.exe -q
 
rundll32.exe shell32.dll,SHExitWindowsEx n
 
Where n is one, or a combination of, the following numbers:
 
0 - LOGOFF
1 - SHUTDOWN
2 - REBOOT
4 - FORCE
8 - POWEROFF
 
All of the above options can be combined into one value to achieve different results. For example, to restart Windows forcefully, without querying any running programs, use the following command line:
 
rundll32.exe shell32.dll,SHExitWindowsEx 6
 
Be careful, using the FORCE option can cause programs to lose data.
 
The following is an explanation of each available option used with the above command line:
 
LOGOFF - Shuts down all running processes, then logs the user off.
 
POWEROFF - Shuts down the system and turns off the power. The system must support the power-off feature.
 
REBOOT - Shuts down the system and then restarts the system.
 
SHUTDOWN - Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped.
 
FORCE - Forces processes to terminate. When this flag is set, Windows does not query running applications to inform them that Windows is shutting down.

This can cause the applications to lose data, therefore, you should only use this flag in an emergency.
 
The "rundll32.exe shell32.dll,SHExitWindowsEx (n)" command mentioned above can also be called from the RunOnce registry key.
 
The runonce.exe -q command restarts the computer after a 15 second delay. There are no other options when using this command line, and it cannot be called from the RunOnce registry key.

If you need more, let me know!

Dennis
0
 

Author Comment

by:alonsolezama
ID: 2580865
sorry but it did not work!
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Command prompt flashing when starting PC 16 88
Keep Ditto Clipboard Manager open for multiple pastes 6 52
Thoughts on PC Doctor 11 62
Unable to Uninstall Visual Studio 2015 7 39
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
An article on effective troubleshooting
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question