SourceForge Project Page | Download it now!

serviceToggler - What is it?
serviceToggler is an application that allows the user to associate NT services on a
computer in to groups.  It allows the user to easily bring up and take down the groups
of services from a simple systray icon.  Additionally, groups of services can be setup
to toggle each other up and down.

For example, as a consultant developer, I am often asked to write applications (duh).
Sometimes the applications may use a MySQL database.  Other times, they may use a
MS SqlServer database.  I don't want to run both database servers on my laptop at the
same time, because usually I'm using one or the other, but not both.  In serviceToggler,
I've configured two service groups: MySQL and SQLServer.

The MySQL group has one service in it: the mysql database service.  The SQLServer group
has numerous services in it: SQL Server database service, SQL Server reporting server
service, etc.

From the systray icon of serviceToggler, I can select the SQLServer group.  It will
shutdown the MySQL service and bring up services associated with the SQLServer group.
Later on, I may choose to select the MySQL group from serviceToggler and it will shut
down the SQLServer services and bring up the MySQL service.

serviceToggler can be configured to use any number of service groups each can be
associated with another group to toggle with.  Groups don't have to be associated with
other groups for toggling, they can stand alone.  Selecting a group once from
serviceToggler brings it up.  Selecting it again, brings the group down.

serviceToggler is a python application.  In order to run it, you will need to install:

The Python interpreter (preferably 2.5) ->
The win32all library for Python         ->
The wxPython library for Python         ->

To run the application simply run the  If you don't like the DOS box
coming up when running it, try renaming to serviceToggler.pyw.

I've included a script that, if you've installed the py2exe library for Python,
will allow you to "compile" the script into a windows executable.  This
can be accomplished by issuing the command:

	C:> python py2exe

This will result in a folder named "dist" being created on your hard drive.  It will
contain serviceToggler.exe and all the files necessary to run it.  It should be
xcopy installable at that point so long as you keep the supporting files with the .exe.


For those of you who don't want to mess with installing Python or hunting down the
required libraries, I've taken the liberty of running the py2exe "compiler" and have
placed the resulting executable and supporting files into the "binary" folder of this
package.  You should be able to just run at will.

serviceToggler reads a single config file named (wait for it...)serviceToggler.ini that
resides in the same folder as the .py script or .exe file, depending on how you

The config file is a simple layout.  In the [Groups] section you specify the number of
groups you'd like to set up.  This is done with the NumGroups entry.  Then you enumerate
them by name with GroupX entries.

After that you should create sections for each of the groups you've set up in the [Groups]
section.  Each group section needs to have at least a NumServices entry and 1 ServiceX
entry.  Optionally you can place a ToggleGroup entry in a service group section to
indicate what service you'd like this group to toggle with.  An example serviceToggler.ini
file might look like this:

	Group1=Microsoft Development
	Group2=Open Source Development
	Group3=Task Scheduler
	[Microsoft Development]
	ToggleGroup=Open Source Development
	[Open Source Development]
	ToggleGroup=Microsoft Development
	[Task Scheduler]

Copyright (C) 2008 Steve Brettschneider

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see .

Steve Logo