Sunday, May 08, 2011

Start And Stop (Licencing) Services As Needed By Applications [Windows XP]

If you use a piece of software (like Corel's "PaintShop Pro" in the example below) you may be plagued with having to let a piece of licencing run constantly in the background, waiting for you to start said piece of software just so it can authenticate it's licencing key. While it might not matter to some, having superfluousness services running may eventually grind your system to a halt, or worse still, grind your brain to a halt when searching the process tree.

Searching the internet, you'll see that the necessity of running this licencing service is easily bypassed using straight forward file operations on some of the installation files and DLL's of PaintShop Pro. Or indeed, you can easily bypass it by sourcing an illegally cracked version of the software, but what if you want to remain legal or are unable to bypass a service in say, another application. Perhaps you might make use of something similar to what I have done. I launch PaintShop Pro using a custom batch file:


First thing you'll need to do is identy the service. Once done you need to find it's "name". This can be using the Task Manager (CTRL+ALT+DLT) or through Administrative Tools in the Control Panel or you can just run "services.msc". You will need to set the service's running behavior from "Automatic" to "Manual" in the services.msc list also. Once you have all that done, you can sub in the name of the service and location of the program you wish to run, into the script above (explanations below). Or just use the code as is if you're running "PaintShop Pro X3".
  1. @ECHO OFF isn't necessary, it just turns off the console prompts.
  2. NET START "PSI_SVC_2" this starts the licencing service.
  3. START "PaintShop Pro" "C:\Program Files... this starts PaintShop Pro. The "PaintShop Pro" in quotes, is an arbitrary, but obligatory requirement.
  4. NETSH Diag Ping Loopback this is a little work around to slow down the batch file so PaintShop loads far enough in that it no longer needs the PSI_SVC_2. All it does is ping the localhost a few times, thus creating a pause. Used as other commands like SLEEP may not be available on all machines. 
  5. NET STOP "PSI_SVC_2" and this stops the service once more.

Save the text inside a file with the ".bat" batch file extension.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...