It is currently Thu Jun 07, 2018 6:20 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Feb 21, 2013 11:10 pm 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463

Here is how to created the above Shutdown Timer Menu for the Classic Shell Start Menu:
(I do this mostly because I like to listen to music as I leave the house or fall asleep..)

**UPDATED to include GauravK's implementation of Shellexecute.exe, added to create Method 1.. Method 2 is without ShellExecute.exe, and linking to BAT files instead
*******************************************************************
***Method 1:***

Step 1, Install Shellexecute.exe :
Step 2, Set Up the New Menu:
  • Right Click the Start button, click "Settings"
  • Click "All Settings" at the bottom
  • Click the "Customize Start Menu" Tab
  • In the Left column, under "Current Menu Items", scroll down to "ShutdownBoxItem"
  • Click on the Item "SEPARATOR", just above "ShutdownBoxItem"
  • In the Right Column, under "Available Commands", scroll to the bottom & double-click "Custom Command"
    • It should appear between "SEPARATOR" and "ShutdownBoxItem"
  • Right-Click the new Item, & Select "Edit Item"
    • in the "Command" box, type "shutdown_box"
    • in the "Label" box, type "Shutdown Timer"
    • in the "Icon" Box, click the "..." to the right
      • Browse to Icon #28, or any icon you have or want
    • Click on the "Split Button Item" checkbox
    • Click OK
  • Now Click on the new Item you created, it should say "Shutdown"
  • in the Right Column, double-click "Custom Command" 5 times
    • all the commands should be in a sub-menu under the first one you created, if they arent, just drag them there
    • You should see:
      • CustomItem
      • CustomItem2
      • CustomItem3
      • CustomItem4
      • CustomItem5
  • Right-Click "CustomItem", and select "Rename" and give them a name without spaces, like:
    • 5MinuteShutdown
    • 15MinuteShutdown
    • 30MinuteShutdown
    • 45MinuteShutdown
    • 60MinuteShutdown
(You can also use these to replace the Shutdown Submenu, so that they are each buttons themselves, just drag them out of the sub-menu and place them on the same level as the Shutdown button)

Step 3, Input Commands:
  • Right Click the first CustomItem (5MinuteShutdown), and select "Edit Item"
    • in the "Command" box, type: shellexecute /F:shutdown.exe /P:-s -t 300 /R:hidden
    • in the "Label" box, type "5 Minutes"
    • in the "Icon" Box, click the "..." to the right
      • Browse to Icon #28, or any icon you have or want
  • Repeat with all the other CustomItems (15MinuteShutdown, etc), except with the following changes:
    • for 15MinuteShutdown:
      • in the "Command" box, type: shellexecute /F:shutdown.exe /P:-s -t 900 /R:hidden
      • in the "Label" box, type "15 Minutes"
    • for 30MinuteShutdown:
      • in the "Command" box, type: shellexecute /F:shutdown.exe /P:-s -t 1800 /R:hidden
      • in the "Label" box, type "30 Minutes"
    • for 45MinuteShutdown:
      • in the "Command" box, type: shellexecute /F:shutdown.exe /P:-s -t 2700 /R:hidden
      • in the "Label" box, type "45 Minutes"
    • for 60MinuteShutdown:
      • in the "Command" box, type: shellexecute /F:shutdown.exe /P:-s -t 3600 /R:hidden
      • in the "Label" box, type "60 Minutes" or "1 Hour"
  • Click OK to close each of them as you finish them
  • Click OK again to close the Settings window
  • Done!
*******************************************************************

***Method 2***
(Without ShellExecute.exe installed - for linking to bat files - but Method 1 is the Preferred Method since no command window will flash up & disappear)

Step 1, Create Bat Files:

  • Create the Bat Files:
    • Go to the folder on your computer you save all of your .Bat files
    • Right-click an empty space, and click New>Text Document
    • Name it "5 Minute Shutdown.bat"
    • Right Click it and select Edit
    • Paste the following text: c:\windows\system32\shutdown -s -f -t 300
    • Click Save & Close it
    • Right-click it, select Copy
    • Hit Ctrl+V 4 times
    • Rename them all to:
      • "15 Minute Shutdown.bat"
      • "30 Minute Shutdown.bat"
      • "45 Minute Shutdown.bat"
      • "60 Minute Shutdown.bat"
    • Right-click them one by one, and paste the following:
      • for 15 minutes, paste: c:\windows\system32\shutdown -s -f -t 900
      • for 30 minutes, paste c:\windows\system32\shutdown -s -f -t 1800
      • for 45 minutes, paste c:\windows\system32\shutdown -s -f -t 2700
      • for 60 minutes, paste c:\windows\system32\shutdown -s -f -t 3600
        • (-s=shutdown, -f=force shutdown, -t=time)
    • Save them all & Close them
Step 2, Set Up the New Menu:
  • Follow the Same Procedures Detailed in "Step 2" above, in Method 1
Step 3, Input Commands:
  • Right Click the first CustomItem (5MinuteShutdown), and select "Edit Item"
    • in the "Command" box, click the "..." to the right, and browse to your "5 Minute Shutdown.bat" file
    • in the "Label" box, type "5 Minutes"
    • in the "Icon" Box, click the "..." to the right
      • Browse to Icon #28, or any icon you have or want
  • Repeat with all the other CustomItems (15MinuteShutdown, etc), except with the following changes:
    • for 15MinuteShutdown:
      • in the "Command" box, browse to your "15 Minute Shutdown.bat" file
      • in the "Label" box, type "15 Minutes"
    • for 30MinuteShutdown:
      • in the "Command" box, browse to your "30 Minute Shutdown.bat" file
      • in the "Label" box, type "30 Minutes"
    • for 45MinuteShutdown:
      • in the "Command" box, browse to your "45 Minute Shutdown.bat" file
      • in the "Label" box, type "45 Minutes"
    • for 60MinuteShutdown:
      • in the "Command" box, browse to your "60 Minute Shutdown.bat" file
      • in the "Label" box, type "60 Minutes" or "1 Hour"
  • Click OK to close each of them as you finish them
  • Click OK again to close the Settings window
  • Done!
*******************************************************************

Here is what it should look like, except "CustomItem's" should be your Names without Spaces, i was lazy:




Last edited by Tenzen on Wed Mar 20, 2013 8:49 pm, edited 11 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 22, 2013 1:20 am 
Offline
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5341
A custom Shutdown menu always allows for so much more. :)

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 22, 2013 3:25 am 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
ya, its a pretty powerful tool... I love it..

Just make sure to turn off the "Exit" button in the settings.. so we dont accidentally default back to the crappy Windows 7 one..


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 25, 2013 6:20 am 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
Add a New Item, Named "CancelShutdown"

  • Command:
    • shellexecute /F:shutdown.exe /P:-a /R:hidden
  • Label:
    • Cancel Shutdown
  • Icon:
    • shell32.dll
    • # 338


Attachments:
Capture24.JPG
Capture24.JPG [ 20.83 KiB | Viewed 15036 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 25, 2013 5:40 pm 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
with Cancel Shutdown in your List, you can change the normal Shutdown Button to:

shellexecute /F:shutdown.exe /P:-s -t 10 /R:hidden

to give you a 10 second window to change your mind before shutting down...

if you want to cancel shutdown because you forgot something, or because you accidentally hit shutdown, just click on your Cancel shutdown button, and Logoff/Shutdown/Restart will be cancelled


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 15, 2013 9:21 pm 
Offline

Joined: Sat Jun 15, 2013 9:18 pm
Posts: 1
make a bat file

@SET /P time=Enter Time in Minutes
@set /a time=time*60
@timeout /T %time% /nobreak
shutdown -s -t 0

link to it and name it "shutdown in specified minutes" or "shutdown in x minutes"

Optionally Make another shortcut that links to the shutdown -a command and name it "cancel shutdown"

Remember NOT to press ctrl+c if you want to cancel the command, instead close the window.


As an added bonus it's much easier than creating all the custom items.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 16, 2013 5:32 am 
Offline
User avatar

Joined: Thu Feb 21, 2013 11:04 pm
Posts: 463
how is a bat file easier than: shellexecute /F:shutdown.exe /P:-s -t 300 /R:hidden

i just duplicated my menu from my desktop to my laptop today, and that was about the easiest thing i could have done, i didnt have to change anything, just put shellexecute.exe in my Windows folder

what sucked was changing all the locations to bat files for menu items using bats or the vbbs files, or to the timer and the vlc etc.. i had to go through and change the addresss one by one

shellexecute is by far superior since every button using it or nircmd or straight cmd, works on any computer with a nircmd or shellexecute in the windwos drive.. didnt have to touch any of those at all.. i wish all program executables could just be thrown onto the Windows Drive to work..

i'd like a program that scans for and finds all the program exe files & folders that classic shell commands & links point to

or a way to change the mapping altogether for all buttons using bats, vbs, or other installed programs

anyway.. it took me a long time to do all the rest


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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.