topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 4:32 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: In Search of A Shutdown/Reboot/Hibernate App  (Read 16447 times)

howardparsons

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 10
    • View Profile
    • Donate to Member
In Search of A Shutdown/Reboot/Hibernate App
« on: June 23, 2009, 04:06 PM »
Hello All,
   I love one-stop shopping ;) and am looking for an app that I can use w/ a button on LaunchBar Commander. This app would either shut down Windows, Reboot the PC or Go into Hibernate mode depending on the parameters passed to the app.

   I'm pretty sure that something like this exists out there "somewhere" but am hoping to find some user recommendations before I start hitting the search engines.

Howard Parsons
Howard Parsons
President - Parsonage Data Services

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #1 on: June 23, 2009, 05:58 PM »
this would actually now that i think about it be a PERFECT use for what i wrote about in this post: https://www.donation....msg168456#msg168456

the Nircmd commandline tool can do this, and it would be perfect for someone to make a nircmd "pack" for LBC that added menu items for it.

if no one else does it by this weekend i will give it a try.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #2 on: June 23, 2009, 10:38 PM »
don't know how this fits with Launchbar Commander, but you could try this little AHK script


#singleinstance
;install, close.ico,close.ico

menu, tray, nostandard

menu, actions, add, LogOff
menu, actions, add, ShutDown
menu, actions, add, Restart
menu, actions, add, Hibernate
menu, actions, add, Suspend
Menu, actions,  show
return

Escape::exitapp

LogOff:
shutdown, 0
return

Shutdown:
shutdown, 9
return

restart:
shutdown, 2
return

Suspend:
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 1, "int", 0)
return

Hibernate:
DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
return

running the script generates a popup menu - select the option and you're done. 

If you've run the script in error, escape exits the app

tested OK on an XP SP2 (?) workstation

oh yeah, you need AHK to run the script (but not the exe)

Steven Avery

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,038
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #3 on: June 24, 2009, 12:14 AM »
Hi Folks,

Keep in mind that anytime you are closing programs you have, as I understand, three different modes of closure, a polite request, a more forceful shakedown, and an absolute kill (which in my experience varies a lot, even the most compelling forced reboot sometimes hangs).

Dimitrios of DTaskmasker and DShutdown discusses these program-close modes some (conceivably you could walk up the ladder as well, starting politely).  Maybe there is a fourth option to simply turn off power rather than kill programs and in that case you run into the question of your OS config options as to whether you might get a restart possibility. Actually, take a look at the Karenware discussion.  Also keep in mind the possibility of auto-signon, Systinternals has an Auto-Logon utility as well as the shutdown utility PsShutdown.  Oh, keep in mind that others can be signed on on the puter with programs running.

If you are going to integrate with existing applications, Karenware's ShowStopper and DShutdown are two to consider. Also Quick Shutdown and Amp WinOff have command line options built-in, and Shutter gets good comments too.

Shalom,
Steven
« Last Edit: June 24, 2009, 01:15 AM by Steven Avery »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #4 on: June 24, 2009, 02:02 AM »
thanks Target, and excellent info steven  :up:

Also, in case i wasn't clear about it, nircmd has commandline functions for this:
http://www.nirsoft.net/utils/nircmd.html

Steven Avery

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,038
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #5 on: June 24, 2009, 06:14 AM »
Hi Folks,

There is a wealth of good programs, one reason I have not put anything yet into the "free for biz" section, trying to sort it out and also some are unclear as to whether they are fully free for biz use, need some checking.  There are about a dozen more freewares that get mentioned, now we have most of note, also Shutdown Monster (open source on SourceForge), Auto Shutdown (recently made open source), another Auto Shutdown by Konrad Papala, Timed Shutdown (strong on cmd line documentation), Shutter, RS Somnifero, MZ Shutdown, Shutdown Machine, Shutdown Scheduler & Shared Notes (network-capable, as is PsShutdown), Quick Shutdown, Simple Shutdown Timer by Shane of CleanMem, System PowerDown in Pristy Utils, AllOff, Sleep Moon Xpress by Reohix, SDS Shutdown Scheduler and Smart Shutdown by Slawdog. Absolute Shutdown simply changes the Windows timer settings, PowerOff (2003) from Jorgen Bosman includes the source code while ShutdownGuard is an open source utility to prevent programs like Windows Update or anything else doing a shutdown without your cnofirmation. And some simply use shutdown.exe along with the windows scheduler.  And RShut has an interesting free internet/Lan wakeup utility - wakeonlan.

I'll try to put these together with the url's for roundup discussion, most are easy to find, if you have a fav not in this list, give a holla.  That will be on a new thread to allow the scripting and programming discussion not to be diverted.

Notice that another consideration is trying to wait for a print job, since apparently that does not show up in CPU measurements.

Oh, is a little article by a small company.

Tip:  Create System Startup / Shutdown and User Logon / Logoff Scripts  - William Stanek
http://technet.micro...gazine/dd630947.aspx

Shalom,
Steven
« Last Edit: June 24, 2009, 01:38 PM by Steven Avery »

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #6 on: June 24, 2009, 05:40 PM »
no credit due here, it's pretty much straight out of the AHK help file...

worth noting that windows (XP at least) already includes a command line to that handles shutting down (but not standby/hibernate - search HELP for shutdown). 

back when i wanted this functionality all the research seemd to indicate that the MS tool was a bit flakey, so I ended up using Andrej Budja's shutdown.exe (this app doesn't do standby or hibernate either).  The homepage for this app appears to be gone, but google turns up plenty of ref's to both the man and the app (posted here for convenience)   

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #7 on: June 25, 2009, 12:17 AM »
How about ZenKey?

According to its website it could be the solution for the request from the original poster.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #8 on: June 25, 2009, 01:26 AM »
there is an alias for nircmd. maybe it can be ported into LBC with the latest "tool packs" feature.


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #9 on: June 25, 2009, 08:51 AM »
As lanux suggested, i took the nircmd alias pack made by jgpaiva for FARR, and converted it to a LaunchBar Commander "tool pack".

With this tool pack/addon, you can now easily add a nircmd submenu to your launchbar from the configuration tree that has nircmd buttons like Reboot, Standby, Shutdown, Screensaver, etc.

Requires the not-yet-released cutting edge version of LaunchBar Commander that will be released in the next day or so.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #10 on: June 25, 2009, 11:26 AM »
and so the amalgamation of Farr & LBC draws near... 8)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #11 on: June 29, 2009, 09:02 AM »
The latest LBC release includes a nircmd tool button you can add.
Go to where you want to add it, and click to insert a node and choose last item in menu to insert from plugin/tool.  then choose nircmd tool.

Now your launchbar will have a nircmd submenu with options for shutting down, rebooting, hibernating, locking workstation, starting screensaver.

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #12 on: June 30, 2009, 03:35 AM »
The latest LBC release includes a nircmd tool button you can add.
Go to where you want to add it, and click to insert a node and choose last item in menu to insert from plugin/tool.  then choose nircmd tool.

Now your launchbar will have a nircmd submenu with options for shutting down, rebooting, hibernating, locking workstation, starting screensaver.

That should be an optional separate download, and come with a warning that your antivirus might not like it. Avira threw a fit and won't let me exclude it.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #13 on: June 30, 2009, 06:21 AM »
oh lord, more antivirus shenanigans.
ok, i'll make it a separate download.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #14 on: July 09, 2009, 08:20 AM »
i wonder if the OP has found what he was looking for? :-\

howardparsons

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 10
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #15 on: July 09, 2009, 08:32 AM »
Yes Indeed! It works like a charm! Although the menu is nice, I created separate buttons on the main dock. :D
Howard Parsons
President - Parsonage Data Services

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: In Search of A Shutdown/Reboot/Hibernate App
« Reply #16 on: July 09, 2009, 09:53 PM »
cool! i think the nircmd toolset should be in the default installation so that it showcases LBC's abilities. :up: