It is currently Thu Apr 18, 2024 10:20 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Before posting a bug report or a feature request, search the forum for an older post on the same topic.



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Shutdown Event Tracker
PostPosted: Tue Jan 26, 2016 5:09 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
I really like Classic Shell. I pretty much install it on every Windows 8, 10, 2012, and 2012 r2 machine. However, it doesn't follow the Shutdown Event Tracker for the systems. If I push a GPO that enforces the Shutdown Event Tracker, then the Classic Shell doesn't follow these rules. I can set the Classic Shell to open the Shutdown Dialog on Shutdown, but there is no option for opening the Shutdown Event Tracker upon restart. i'd love to get 1 of 2 options here. I'd like to see Classic Shell follow the local machines Shutdown Event Tracker and if it is enabled, to automatically show the event tracker for both Shutdowns and Restarts, or give me the option to enable the Shutdown Event Tracker on Restarts of machines as well.

Honestly, it is kind of a buzz kill not having this feature. We track all shutdowns and restarts through the event trackers for all of our servers, and we cannot really use Classic Shell on our new Server 2012 R2 infrastructure because we need the ability to automatically ask for a reason for reboots AND shutdowns. :(


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2016 5:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
What happens when you shut down through other means, like from the command line?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2016 5:47 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
Well, I can use command line and even run a shutdown /i to give me the Shutdown Tracker GUI, but I cannot use the restart command on the Classic Shell menu. I see the option in the manu for having the main button open the event tracker. It would just be nice for the Classic Shell to follow what the computers current shutdown and restart tracker settings.

BTW, we could technically do a shutdown /r and bypass the need for an event tracker, but nobody does that.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2016 10:51 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
@slwtx1983, The supported way to use the Shutdown Event Tracker UI via Classic Shell's Start Menu is setting the Shutdown command in Classic Shell to "Shutdown dialog" for the Windows 7 style or to "shutdown_box" for the Classic styles. Then, if the policy setting "Display Shutdown Event Tracker" is enabled, you get the Shutdown Event Tracker UI. That dialog contains all the actions you need - Shutdown, Restart and others. You can also customize the default command used in that Shutdown dialog using this method: http://winaero.com/blog/how-to-set-the- ... indows-10/ so if "Restart" is the command you use more frequently, you can set the default to "Restart" for the Shutdown dialog. There are easy ways to change the action in the Shutdown dialog - arrow keys, pressing the keyboard accelerator (S for Shutdown, R for Restart and so on) besides mouse and touch. So there exists at least this one way to document the Shutdown/Restart reason and still use Classic Start Menu.

If you are using the Windows 7 style, just don't use the standalone "Shutdown" and "Restart" commands and train everyone to use the "Shutdown..." command which displays the dialog. You can also hide the other commands to prevent them from being used. In Windows 7 style, see the setting "Shutdown menu items". If you configure it as shown in the screenshot below, you get a Shutdown menu with the "Restart" command hidden so everyone can be redirected to use "Shutdown..." command.

In Classic styles, the Shutdown commands themselves can also be customized from the "Customize Start Menu" tab so you can set all of them to "shutdown_box".


Attachments:
Shutdown menu.png
Shutdown menu.png [ 7.06 KiB | Viewed 35313 times ]
Shutdown command setting.png
Shutdown command setting.png [ 31.43 KiB | Viewed 35313 times ]
Shutdown Event Tracker.png
Shutdown Event Tracker.png [ 18.78 KiB | Viewed 35315 times ]

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.
Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2016 11:20 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
Yes, I believe I already mentioned that above. My main question was 2 fold. 1. Can there be a setting to launch the Shutdown dialog on a restart. 2. Can it be setup to simply follow the current machines local policy by default. So if it is a server machine, the server shutdown tracker is turned on by default. Can the classicshell start menu be setup to detect the windows machines current shutdown tracker setting and use that setting for Shutdown and Restart automatically?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2016 11:50 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
The short answer is no to both your questions, unless you are willing to do some configuration, and even then, only the classic style of the menu can open the Shutdown dialog with Event Tracker UI when you click either "Restart" or "Shutdown".

The user interface that Windows 8 or Windows 10 display for the Shutdown Event Tracker is a new addition to these OSes since these OSes no longer call the old Shutdown dialog via their Start Menu/Start screen. Microsoft has not allowed a way for third party developers to call this Metro style UI. So, the old Shutdown dialog is the only way possible to use Classic Shell's menu and use the Shutdown Event Tracker.


Now, only in Classic styles of the menu, there *is* a way to launch the old Shutdown dialog when you click "Restart". For that you'll have to do some configuration in Classic Start Menu Settings. Go to the Customize Start Menu tab and in the left column, scroll down and locate the "restart" item. Double click this to bring up the "Edit Menu Item" dialog. Change the Command to "Shutdown_box" from "restart" but keep the "Label" and "Tip" unchanged. Click OK to save settings. Repeat this for "Shutdown" too if you want (Change command to "Shutdown_Box). Click OK in the main settings dialog to save changes and close it.

Now when users click "Restart", they will get the old dialog and if the policy for Shutdown Event Tracker is enabled, you can document the reason there.

If you are using the "Windows 7 style" of CSM, then it doesn't allow customizing the "Command" field of the power related actions. You can only hide certain actions there as I showed in the screenshot above and make the default command as "Shutdown dialog".

The default command that this old dialog itself uses can be customized by editing the Registry: http://winaero.com/blog/how-to-set-the- ... indows-10/

On server, the shutdown tracker is turned on by default, so the OLD Shutdown dialog (that is part of Windows, not Classic Shell btw) *should* also have it enabled out-of-the-box but you will still have to at least configure Classic Shell to call this old dialog (for Windows 7 style). Classic Shell supports Group Policy too and the settings can be imported via command line, the installer supports command line switches also.

Which style of the Classic Shell menu are you using - Classic style or Windows 7 style?

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 10:38 am 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
I love the info. Thank you so much for all your help. Let me first start by answering your question. I am using the Windows 7 theme in Classic Shell. Let me then let you know why I submitted my query. The other day, I was working remotely on a production Hyper-V server in my datacenter. I went to Log Off, but my mouse lagged and clicked on the Shutdown button. Luckily, it is in a cluster so there was no customer downtime, but it was a dangerous mistake to make. I have never changed any settings in the Classic Shell on these machines, and it definitely didn't give me the Shutdown Tracker. In fact, I went through the other day and was playing with it, and none of the server have the Shutdown Tracker turned on by default. I ended up going through and setting each of them to completely disable the shutdown and restart options, and set Log Off as the primary button. I'd rather use commandline to shutdown and reboot my servers in the datacenter, than make that mistake again.

I'd figure what you said to be true, that by default it is always set to use the Shutdown Tracker dialog on a server. Like the old Server 2003 days, I could disable the Restart button, and everyone would just click Shutdown, even if they wanted to restart. I was mostly just coming here hoping to figure out if the Restart command could at least follow the current setting for the Shutdown button inside the ClassicShell start menu. So if the Shutdown button is set to open the tracker, then the Restart button would do the same (out of the box). Just in case I install it on a new server and forget to update the Restart button configuration.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 11:00 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
So basically you want Restart to do the same as Shutdown? That doesn't sound very useful, as you could just remove Restart from the menu.

I think it's expected that you have to do some configuration on a new server. Particularly since you can adjust the contents of the shutdown menu from the group policies. It can be rolled into whatever setup you do on new machines.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 12:26 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
It may not sound useful to you, but Windows Server 2003 and up all follow the same principal for Restart and Shutdown. Both, by default, bring up the Shutdown Event Tracker. The difference being that when you restart, it defaults the setting to "Reboot" and when you shutdown, the default setting is "Shutdown". I am not sure why that seems less than useful to you, but tracking reboot and shutdown events is very popular.

Also, yes, configuring servers is expected. Owning a company that hosts servers, I don't have the liberty of running a single Group Policy. I'd have to configure it for each new environment. As stated, it isn't a horrible ordeal. I basically use an Image with ClassicShell preinstalled. I just need to launch the image and adjust the registry so that it disables the Restart option.

The main issue with disabling the Restart option, is that post Server 2003, the Shutdown and Restart options are not merged. People are used to having separate options for Shutdown and Restart since Server 2008. It isn't the same as the previous versions and therefore it requires a small amount of training. My goal was to see if we could just make them the same. If shutdown event tracker is enabled, Shutdown and Restart should be the same. Disabling it is a possibility, just as not using Windows at all is sometimes a possibility. It just doesn't follow the same rules as Windows Server has for the last 8 years. Useful is not really the point. Continuity is what is in question here.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 1:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
I understand what you mean by Restart vs Shutdown, however if the suggested change is to use the Shutdown dialog, I don't see the difference - both would bring up the exact same dialog with the same setting selected by default.
If you suggest to instead bring up some other UI, I would like to know how to do that. What is the command to open the Shutdown Event Tracker in restart or shutdown mode?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 1:41 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
How does it currently call the event tracker? Is it not possible to simply call the event tracker the same way but with a different command. Can you let me know how it currently calls the shutdown event tracker dialog box?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 1:53 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
I am not dealing with the shutdown event tracker at all.
I am just showing the Shutdown dialog - the same one you get when you click on the Desktop and press Alt+F4. It is not done via command line. There is an API for it.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 2:11 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
I looked on the dev site and couldn't find the specific API. Do you have a link to the API that calls the Shutdown dialog box, or perhaps the API name, so I can look it up?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 2:35 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
I don't have the source code at the moment, but I think it's this one:
https://msdn.microsoft.com/en-us/library/windows/desktop/gg537727(v=vs.85).aspx


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 6:53 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
I think your problem is solved then since you can hide Restart and Shutdown and keep only the Shutdown dialog, in Windows 7 style. You however get to choose only one default action in that dialog - either Restart or Shutdown.

If you are using the Event Tracker to only block a shutdown or restart which might be initially accidentally, there is another app which can block such events called ShutdownGuard: http://winaero.com/blog/avoid-accidenta ... downguard/ Unless you use the Event Tracker to really log the reason every time and not just to block the 1-click Shutdown/Restart, then this app should also do the trick on a datacenter where uptime is most important. It can block even programmatic shutdowns/restarts such as the one initiated by Windows Update, or some installer or some malware.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 10:26 pm 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
Yeah, I found your source code from many moons ago. http://www.codeproject.com/Articles/45430/Classic-Shell. Looks like IShellDispatch::ShutdownWindows() was definitely the correct code.

Gaurav - I do use the event trackers, but thank you so darn much for that ShutdownGuard app. I'll definitely check this out and am excited at the prospect. It looks like this is your app, correct?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 27, 2016 11:35 pm 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5374
@slwtx1983, No I am not its developer. I wrote an article about it since I use it myself and many others like Classic Shell that make the Windows experience a million times better.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and helped a little with Classic Shell's testing and usability/UX feedback.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 28, 2016 12:34 am 
Offline

Joined: Tue Jan 26, 2016 5:05 pm
Posts: 9
You are not lying. I was not happy with the lack of start menu in 8. However, windows promised to bring it back in 8.1 and wow did they disappoint. It was then that I ran out and found classic she'll, and I was glad I did. Mostly because when Windows 10 was released, the start menu was equally disappointing. Every end user that I come across that says they updated to 10 and hate it, are immediately turned around after I install Classic Shell.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 106 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.