title: Running a process at the Windows 7 Welcome Screen
body: <p>So here's the scoop:</p>
  
  <p>I wrote a tiny C# app a while back that displays the hostname, ip address, imaged date, thaw status (we use DeepFreeze), current domain, and the current date/time, to display on the welcome screen of our Windows 7 lab machines.  This was to replace our previous information block, which was set statically at startup and actually embedded text into the background, with something a little more dynamic and functional.  The app uses a Timer to update the ip address, deepfreeze status, and clock every second, and it checks to see if a user has logged in and kills itself when it detects such a condition.</p>
  
  <p>If we just run it, via our startup script (set via group policy), it holds the script open and the machine never makes it to the login prompt.  If we use something like the start or cmd commands to start it off under a separate shell/process, it runs until the startup script finishes, at which point Windows seems to clean up any and all child processes of the script.  We're currently able to bypass that using <code>psexec -s -d -i -x</code> to fire it off, which lets it persist after the startup script is completed, but can be incredibly slow, adding anywhere between 5 seconds and over a minute to our startup time.</p>
  
  <p>We have experimented with using another C# app to start the process, via the Process class, using WMI Calls (Win32_Process and Win32_ProcessStartup) with various startup flags, etc, but all end with the same result of the script finishing and the info block process getting killed.  I tinkered with rewriting the app as a service, but services were never designed to interact with the desktop, let alone the login window, and getting things operating in the right context never really seemed to work out.</p>
  
  <p>So for the question:  Does anybody have a good way to accomplish this?  Launch a task so that it would be independent of the startup script and run on top of the welcome screen?</p>