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 06, 2016, 10:04:56 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 Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3  (Read 17417 times)

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Service Control 0.0.0.3

This plugin displays a list of win32 services and allows user to toggle its running state.  Th idea came from OGroeger and Mouser (See this thead: HERE)

A few things of note are:
0)  Only works on NT/2K/XP for now
1)  Only works if user is a member of the Administrator group - EDIT: also works on Vista now
2)  If a service is currently disabled, it enables it before starting.
3)  If a service has dependency services, it shows you the list of services that will also get stopped.
 
Depending on interest, I have some TODOs:
* add progress bar when start/stop services - DONE
* Vista compatibility (thinking of using ShellExecuteEx with "runas" verb to launch a separate script, or separate the code into a separate COM control so it could be elevated Just-In-Time) - DONE
* ability to run as standard user with admin impersonation

Installation:
Extract the zip file to the farr2 plugins directory then reload the plugins from the plugins listing screen.

Screenshot:

1.jpg

2.jpg

3.jpg

4.jpg

5.jpg

Version History

v0.0.0.1 (July 3rd, 2007)
Initial Release

v0.0.0.2 (July 5th, 2007)
[NEW] Added Progress Bar
[FIX] Changed default options to show progress bar and not display msgbox
      on success
[FIX] Set max wait time to 20 secs to avoid misbehaving services taking forever
      to start/shutdown

v0.0.0.3 (July 5th, 2007)
[NEW] Added Vista Support

Comments and constructive criticisms are welcome!

Thanks to hamradio for the beautiful icons!!!!  :-*
« Last Edit: July 06, 2007, 03:03:54 AM by taichimaster »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #1 on: July 04, 2007, 06:04:54 AM »
Fantastic!!  :-* :-* :-*

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #2 on: July 04, 2007, 07:26:57 AM »
I, for one, love this idea! Keep up the good work!

Lashiec

  • Member
  • Joined in 2006
  • **
  • Posts: 2,374
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #3 on: July 04, 2007, 09:36:21 AM »
Haha! He wants to take all the mugs! ;D

Good work!

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #4 on: July 04, 2007, 09:56:06 AM »
What I would like to suggest is a right click context menu which allows the following:

Starting a service, Stopping a service, restarting a service, changing startup type (with a sub-context menu containing a list of startup types).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #5 on: July 04, 2007, 10:04:09 AM »
yep, taichi and i have discussed that adding a feature to allow plugins to set a custom context menu for results needs to be added by me.

we also came up with the cool idea of having these custom context menu actions also be accessible through +keyword modifiers.  so if a plugin might register custom actions like "Start the service (+start)","Stop the service (+stop)", which would then let users either right click on a result to chose the action to perform, or else just type +start in their search and select the result to have it sent that command.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #6 on: July 04, 2007, 11:41:19 AM »
Well then add it mousey! Why are you SHAMMING?

OGroeger

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 76
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.1 - My FARR2 Plugin Contest Submission #3
« Reply #7 on: July 04, 2007, 12:28:44 PM »
@taichimaster: splendid  :Thmbsup:

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.2 - My FARR2 Plugin Contest Submission #3
« Reply #8 on: July 05, 2007, 03:08:16 PM »
v0.0.0.2 (July 5th, 2007)

[NEW] Added Progress Bar
[FIX] Changed default options to show progress bar and not display msgbox on success
[FIX] Set max wait time to 20 secs to avoid misbehaving services taking forever to start/shutdown

1.jpg

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.2 - My FARR2 Plugin Contest Submission #3
« Reply #9 on: July 05, 2007, 09:00:26 PM »
v0.0.0.3 (July 5th, 2007)
[NEW] Added Vista Support

This version will properly prompt for elevated perms. before starting/stopping the service  :up:  A ServiceCtrlHelper.exe will then be running with elevated privileges.

Caveat:  Since the adv. config are stored in the same directory as the plugin (c:\program files), they are normally being virtualized. ServiceCtrlHelper.exe will not be able to read those preferences and therefore will just do the default (show progress bar, show msgbox upon failure, and do not show msgbox upon success).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Service Control 0.0.0.2 - My FARR2 Plugin Contest Submission #3
« Reply #10 on: July 05, 2007, 09:03:50 PM »
Quote
Caveat:  Since the adv. config are stored in the same directory as the plugin (c:\program files), they are normally being virtualized. ServiceCtrlHelper.exe will not be able to read those preferences and therefore will just do the default (show progress bar, show msgbox upon failure, and do not show msgbox upon success).

I don't fully understand what you are saying the solution to this is..  Perhaps the options need to be stored in user profile subdir after all?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Service Control 0.0.0.2 - My FARR2 Plugin Contest Submission #3
« Reply #11 on: July 05, 2007, 09:05:15 PM »
also: looks like i need to upgrade the updater so that if its an update file that is a zip then it should prompt user to handle it.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Service Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3
« Reply #12 on: June 19, 2008, 08:03:42 PM »
a small request: how about adding a filter to show only currently active services and vice-versa? right now "sctrl +sall" lists about 90+ services (active & disabled) on my PC.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3
« Reply #13 on: September 11, 2012, 10:17:24 PM »
Taichimaster, any chance you would consider revisiting this to add win7/8 support? This would be very useful! It lists services properly, but I do not think it can kill them due to UAC.

taichimaster

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 160
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3
« Reply #14 on: September 11, 2012, 11:41:17 PM »
Hi Josh, it should already have Win7 support (have not tried Win8 though).  It comes with an helper (ServiceCtrlHelper.exe) that is capable of elevating perms to start/stop a particular service.  Please do let me know if it doesn't work for you.

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3
« Reply #15 on: September 12, 2012, 07:32:04 AM »
Hmmm, for some reason it was not working last night. I just rebooted and it now appears to be working on Win8 Pro x64.

Have you considered adding a way to start/stop multiple services at a single time, or creating a "service group" to start/stop? For example, I have VMware installed and have the services set to start manually so they are not always running (VMware Auth Svc, VM Workstation Svr, VMware DHCP service, VMware NAT Service, VMware USB Arbitration svc).

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Service Control 0.0.0.3 - My FARR2 Plugin Contest Submission #3
« Reply #16 on: September 23, 2012, 07:41:26 PM »
Taichi, had you considered wildcards such as sctrl vmware* or sctrl windows media* to start, stop or restart all services with those names? If multiple exist in different states, possibly prompting for what to do (start or stop)?