Solved

i need a .bat file that exits win98

Posted on 2000-02-23
7
322 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
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

738 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