herbalist Posted April 26, 2007 Share Posted April 26, 2007 I want to replace the "Shut Down" entry on the start menu with a link to a batch file. Getting rid of "shut down" is easy enough but I haven't figured out how to add an entry in its place. This is for 98 first edition.Thanks.Rick Link to comment Share on other sites More sharing options...
awergh Posted April 26, 2007 Share Posted April 26, 2007 how did you get rid of shutdown? Link to comment Share on other sites More sharing options...
herbalist Posted April 26, 2007 Author Share Posted April 26, 2007 XSetup Pro has options for removing start menu items. I was hoping that by seeing what registry entry it changed, I'd be able to figure out what to add. Didn't work that way. It removed the "Shut Down" entry by adding:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer "NoClose"I didn't see any options available thru the policy editor that would help either.Rick Link to comment Share on other sites More sharing options...
ShadeTreeLee Posted May 2, 2007 Share Posted May 2, 2007 You really may not want to rid yourself of the 'Shut Down Windows' box only available from the Start Menu's Shut Down choice. It's only when that box shows itself that the ShellIconCache file builds/re-builds itself. Why the two functions are made that way escapes me but that's how it is.Perhaps a better approach to running a batch file at shut down would be to alter msdos.sys line BootGUI=1 to a zero and then add Win line to rear end of Autoexec.bat followed by the batch text you wanted to run in the first place. I have never used this approach but always wondered about it. A lot would depend on just what you wanted to do in batch at shut down too, you might get whacked by wanting to run a 32 bit long filename process but be stuck in 16 bit DOS as Windows has just shut down. More info might help. Link to comment Share on other sites More sharing options...
BenoitRen Posted May 2, 2007 Share Posted May 2, 2007 You can also get the Shutdown box by pressing Alt+F4 at the desktop. Link to comment Share on other sites More sharing options...
herbalist Posted May 5, 2007 Author Share Posted May 5, 2007 (edited) I'd like to replace the normal "shutdown" entry with a link to a batch file that gives me several shutdown options.These would include:normal shutdown/restart entries using rundll32. Above plus entries to erase a list of files and locations as part of the shutdown.Options to drop to DOS and call other batch files for multiple purposes.I'm looking to modify/replace the standard shutdown options, but don't need a graphical interface. Since I'd be using it in place of the normal shutdown option, I'd like it to replace "shutdown" on the start menu instead of adding more entries to the start menu or more desktop shortcuts. If you're familiar with the secure shutdown option of Sentinel, I'm doing something similar to that with DOS with other ideas added, and make it the default method of shutdown/restart. The batch files are pretty much finished, until I get more ideas and do it all over again. All I really need is a way to put a link to the main batch file in place of the shut down entry instead of farther up the start menu.Rick Edited May 5, 2007 by herbalist Link to comment Share on other sites More sharing options...
ShadeTreeLee Posted May 6, 2007 Share Posted May 6, 2007 I was afraid that was just exactly what you wanted. Other than re-writing Windows files, I don't think it can be done exactly as desired. You will notice that the Start Menu has three areas divided by thin lines. Each section is under the control of a specific file, usually a dll and if you want a new choice or function within that division, one then has to re-write the dll to do exactly that. In this case, I'm thinking one would have to re-write Explorer.exe file but I'm probably wrong, it might be shell32.dll file. Last I knew, that's how it's done, at least that's what I've been able to gather so far.Other options include what I've posted already in combination perhaps with BenoitRen's tip about ALT+F4 when desktop has the focus keypresses and/or Windows Scripting Host using vbs to "send keys" behind the scenes to both launch the shutdown box and auto choose it so that you don't run without a ShellIconCache file update. Using vbs one can also run batch files invisibly such that the user is NOT aware that any are running or have run.CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, FalseCopy, Paste and Save the above as hide.vbs and then call it like so:wscript.exe ".\hide.vbs" ".\Dosomething.bat"Unless you've got obvious screen settings to the contrary, the user won't see the batch file run nor will he see the vbs script launch so much as an icon in the taskbar. Above paths are set for the root of a CDROM drive so your mileage will probably vary.I don't know a thing about Sentinel, sorry. But it does sound like you want to remain in Windows to do last minute file deletions which would be best with Windows' DOS box's long filename support. Don't forget that there are plenty of free shutdown apps that would allow you to have it your way, http://www.simtel.net/ being one that would have several to choose from. Link to comment Share on other sites More sharing options...
herbalist Posted May 6, 2007 Author Share Posted May 6, 2007 I was hoping that there'd be a simpler way but didn't really expect to find one. I had both windows and DOS tasks in mind, depending on the option chosen. I'm going to just let it sit at the top of the start menu and remove the standard shut down entry. Should still do what I want. I was trying to keep the "original" look but it's not absolutely necessary. Other users aren't a problem as tight as this box is locked down. This was mainly for my own user profile, but if it works as I want, I'll add a different variation on the other profiles too.ThanksRick Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now