I am writing a test application that is controlling another computer through a test computer RS-232 port through a command String has been started (from a control computer running Windows XP SP2 using a C # application), at that time the test computer will be power-on and boot Windows XP. I would like to know what will be the best way to determine when the computer has completed this boot process and is running normally.
I was thinking of the following:
1) I was either thinking of pinging the computer or 2) be a shared drive and if able to reach that shared drive , Or 3) writing a small service that I can communicate with
different / better approach?
I had the exact problem you made, I found a custom service writing was most useful It is important to know that when a headless machine creates a remote desktop service to accept the connection, the program I wrote that actually the PC speaker beeps a bit while it is ready for logging.
Edit: I have dug up the source, Jah You are interested.
Using the system.ComnantModel; Using the system.Install; Install the system.RuntMan.Internop Services; Using System.ServiceProcess; System.Threading; Namespace Beeper (Static Class Program) Main entry point for the application. /// & lt; / summary & gt; Fixed Zero Main () {ServiceBase [] ServicesToron; ServiceOutin = New servicebase [] {new beeper ()}, servicebase run (services) Torun);}} Public partial class beeper: servicebase {public beeper () {} Onster T (string [] args without secure override {if (MainThread! = Null) MainThread.Abort (); Mainthah = New Thread (New Thread Start (Menloop)); MainThread.Start (); } Protected Override Zero Ontop () {If (Maththread! =) MENTHITEITE Ebert (); } Protected Zero MainLoop () {try {// main code here} Catch (ThreadEbortException) {// Cleanup Code Here }} System.Threading.Thread MainThread; } [RunInstaller (true)] Public class BeeperInstaller: Installer {Personal Service ProcessInstaller Process Installer; Personal Service Installer Service Installer; Public BeeperInstaller () {processInstaller = New ServiceProcessInstaller (); ServiceInstaller = New Service Installer (); Process installer.account = service account. Local system; ServiceInstaller.StartType = ServiceStartMode.Automatic; ServiceInstaller.ServiceName = "MyProgram"; ServiceInstaller.ServicesDependedOn = New String [] {"TermService"}; // Optional, this line ensures that the terminal service is starting and running before it starts. Installers.Add (serviceInstaller); Installers.Add (processInstaller); }}}
Comments
Post a Comment