Code Samples for Developers

All code samples linked from here are put in the public domain unless explicitly licensed differently in the source code itself. You may use them however you wish but we would appreciate proper attribution, please do not pass these off as your own work. The code is provided "AS IS" it carries no guarantees at all.


Launching an Interactive Process From a Service - How many times have you seen the question asked - How can I set it so the user can interact with my service? Far too often I'm sure. And how many times have you seen the answer - just check the 'Allow service to interact with desktop' box on the Log On page of the service properties? Read the article...
 
Download the code

Launching a Process With New Credentials - A couple of days ago a friend of mine called with a problem. She had a Windows service written in C# that, under certain conditions, needed to launch some applications on behalf of two specific users and she was getting one error after another. Read the article...
 
Download the code