views:

40

answers:

2

Hi,

i'm using a Windows 2003 Server. I have a session with my username on it and i have a windows application (not service) opened on it. I want this application to always be running.

The problem is, when Security updates force Windows to reboot, my session is closed and i need to reconnect to the session to get my application working again ..

How can i do to automaticaly force the opening of my user's session upon server's reboot ? (application launch is in the startup of my session)

Thanks

A: 

Add a startup script, http://technet.microsoft.com/en-us/library/cc779329(WS.10).aspx

Cem
and how can i force the logon of a specific session by script ?
Fredv
Running the program from a computer startup script would have the process run as the SYSTEM user, which it sounds like Fredv does not want.
ewall
A: 

If you want to have the program running consistently, I would highly recommend making it into a Windows service (see also this page). Then you can set the username that the service logs on with (this is particularly important if the app needs to access networked resources), and even set the stability values to have the service restart itself if the EXE crashes for some reason.

Otherwise, if you really want the computer to login as your user and run the program, you could set the autologon parameters to your username and password, and put the shortcut to your program in the user's Start Menu Startup folder. (But this does not provide you any of the stability benefits that a service would.)

ewall
Thanks ewall, Autologon seems what i need .. even if it's not as stable as a service, i'm ok with that
Fredv

related questions