Solved

i need a .bat file that exits win98

Posted on 2000-02-23
7
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

630 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