PVF Launcher

Windows services at your fingertips !

 

Home

 

 

Download

 

 

Tutorial

 

 

News

 

 

Tips & Tricks

 

 

SourceForge.net Logo

Tips & Tricks

Tips & Tricks

 

      Most console applications display messages while they run. These messages can be useful to the user or to the developers. When that application is run as a service, the console is hidden. However, you may capture the output to a file. This is very easy if you know something about redirections.

      In Windows (and other operating systems) it is possible to redirect the input and output of an application to files. This is done by using the operators: '<' and '>'. So, if you want to capture the output of myapp.exe to a file named myapp.out, you must use the command: myapp.exe >myapp.out at the command prompt or in a batch (.BAT) file.

      With PVFLauncher, you can do the same thing. First, create a .BAT file that will start your application as shown above. Then, make PVFLauncher start this batch file.

 

      If you try to run an application that comes with a graphical interface (or some sort of interaction with the user desktop), you will see that they don't start. This happens because normally, services aren't supposed to show any windows, icons or message boxes. However, you can get past this problem if you modify the rights of the PVFLauncher service.

      On Windows 2000/XP, you must go to Control Panel/Administrative Tools/ Services. Here you must find the PVFLauncher service and double click on it. In the window that appears, select the "Log On" tab. Here, check the box "Allow the service to interact with desktop". Now click the "OK" button and close all other windows. After doing this, restart your computer and your problem is fixed.

      Unfortunately, at this time there is no automated procedure to make those changes. In the future, there will probably be an option available, but until then, you must make the change manually or write a program to do it for you (if you write such a program, please send its source to me and I will integrate it in PVFLauncher).

     Warning: If you allow the service to interact with the desktop, you will see all application windows, systray icons and message boxes. If this becomes a problem, simply uncheck the "Allow service to interact with desktop" checkbox (see above).