Easiest way would be to create a shortcut to the application in the Windows startup folder:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup If you must edit the registry, I would strongly recommend adding an entry to the HKCU instead of HKLM (the latter requires administrative privileges). I can't resist saying for the record that besides all these options you are already doing it the "best" way - to create a Windows service for the purpose. On Jul 22, 5:26 pm, Processor Devil <[email protected]> wrote: > man, find something about HKLM\Software\Microsoft\CurrentVersion\Run > registry key (you also use HKCU\Software\Microsoft\CurrentVersion\Run), but > this goes just under your user name, the first one works for all users on > the computer... > Or you can register your chat as windows service (easy way is do it using > WMI in Windows or manually also in registry keys). > To do it via .NET code, learn something about > System.Management.ManagementObject class. > > 2009/7/22 David Adamo Jr. <[email protected]> > > > > > > > I developed a chat application with an attendant chat server. > > Everything is working fine. The issue now is the fact that whenever > > the chat server goes down (for instance, the server system shuts down > > as a result of power failure or some other problem), by the time the > > server system come back on, the chat server would have to be restarted > > manually. > > > I believe (and I know) it is more appropriate for the chat server > > application to restart itself when the computer comes back on (and of > > course regardless of who is logged in and of course, even before > > anyone logs in). I have a batch file that executes the chat server. My > > attempt was to create a windows service that start automatically and > > runs this batch file using a Network Service account on the server > > system. Although, I'm having a hard time with this (temporarily), I > > would love to ask if there are any alternatives to using a windows > > service. Suggestions are highly appreciated.- Hide quoted text - > > - Show quoted text -
