Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 10, 2016, 12:55:41 AM
  • Proudly celebrating 10 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: Service Killer for Shutdown?  (Read 2183 times)

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
Service Killer for Shutdown?
« on: October 09, 2013, 01:45:25 AM »

This one is inspired by the fact that AppleMobileDeviceSvc and maybe a few others block my machine from shutting down.

So it would be neat if when a shutdown command is triggered, this program kicks in first, and power-bombs said services, and then the shutdown would be "as normal". In a perfect world, you fiddle with the settings but then no dialogs, it "just works" - aka you set the services once in a Settings, not a popup every time "do you want to kill X".

Because it's the same X ones every time.

A bonus feature would be that Adobe Update Reminders only seem to come in *after* I reboot ... but that burned four minutes already! So Adobe would "threaten" ten more minutes of lost time!


AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #1 on: October 09, 2013, 02:03:23 AM »
How about a batch?

maybe-not-100%-working dummy example Shutdown.cmd:
@ECHO OFF
net stop AppleMobileDeviceSvc
net stop "another X"
shutdown /s /t 99 /c "shut down by TaoPhoenix"




 

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #2 on: October 09, 2013, 02:32:55 AM »
How about a batch?

maybe-not-100%-working dummy example Shutdown.cmd:
@ECHO OFF
net stop AppleMobileDeviceSvc
net stop "another X"
shutdown /s /t 99 /c "shut down by TaoPhoenix"

Hehe. I am a dumb Humanities Birdie. So can you please make into something that I double click and it then sits there?

: )


AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #3 on: October 09, 2013, 03:48:00 AM »
Step-by-Step:

- create a new text file on your desktop

- open it to edit and enter:

@ECHO OFF
REM Everything behind the word REM is just a comment
REM Your description, what this batch does goes here...

REM stop this services:
REM (type NET START in a DOS-BOX to see the service names to use here)

NET STOP theNameOfServiceToStop
NET STOP "theNameOfService with blanks to stop"

REM shut down the PC. Enter 'shutdown /?' into a DOS-Box to see all available parameters
SHUTDOWN /S

REM this is the end, my friend

- save this file with a CMD extension like shutdown.cmd
- double click this batch file and watch your PC shutting down.


I can't guarantee that it will work with your environment and settings...
Maybe you have to right click the batch and choose "Run As Admin" for Vista/Win7 to execute with enough rights.
Perhaps you have to enter a line or two in between to wait before doing the next step, like
PING -n 8 127.1.2.3 >NUL


Any more questions? Just asks...

 

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #4 on: October 09, 2013, 07:04:28 AM »
This is what I get from however I interpreted your advice:

C:\Documents and Settings\user.NONE-79DB031E3D\Desktop>[copy or print]
'[copy' is not recognized as an internal or external command,
operable program or batch file.
System error 1060 has occurred.

The specified service does not exist as an installed service.

System error 1060 has occurred.

The specified service does not exist as an installed service.

'[copy' is not recognized as an internal or external command,
operable program or batch file.
System error 1060 has occurred.

The specified service does not exist as an installed service.

System error 1060 has occurred.

The specified service does not exist as an installed service.

'[copy' is not recognized as an internal or external command,
operable program or batch file.
System error 1060 has occurred.

The specified service does not exist as an installed service.

Win XP if that helps. (Rumored to be slightly grouchy!)

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,296
    • View Profile
    • www.StoicJoker.com
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #5 on: October 09, 2013, 07:05:39 AM »
If your not adverse to using a windows native solution:

Force Apps closed on shutdown

Force services closed on shutdown

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,025
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #6 on: October 09, 2013, 07:23:05 AM »
See if this will do what you want.
http://www.geekstogo...th-oldtimers-helper/
I use it to kill process's before running some clean-up operations.
It will not kill everything, because you can use the start-misc-operations that will open a folder view.
And the OTH program window will still be there after 'kill all process'.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,115
    • View Profile
    • Donate to Member
Re: Service Killer for Shutdown?
« Reply #7 on: October 09, 2013, 07:39:56 AM »
[copy or print]
'[copy' is not recognized as an internal or external command, operable program or batch file.
This "[copy or print]" line comes from this forum software and has nothing to do with the batch,
so don't copy that line to your batch.

Quote
System error 1060 has occurred.
The specified service does not exist as an installed service.
You have to exchange the name of the service behind the "NET STOP " command
with the name of the service you want to stop. (Open a DOS-Box and type "NET START" to see all available services you can perhaps could stop)

Quote
Win XP if that helps
I don't know, but for WinXP the parameters for the shutdown command are used with an hyphen instead with an slash as for Win7:
 http://www.microsoft...utdown.mspx?mfr=true
http://www.computerhope.com/shutdown.htm

So you should use
SHUTDOWN -s
instead of
SHUTDOWN /s


 
« Last Edit: October 09, 2013, 07:45:24 AM by AbteriX »