Solved

i need a .bat file that exits win98

Posted on 2000-02-23
7
317 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
Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

 

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

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now