D
David Sworder
Hi there,
I'm designing an application in C#. One of the files in my application
is "server.exe". This assembly listens for inbound connections and handles
various incoming requests. I want to give the user of my application the
option to allow server.exe to execute and handle requests even after the
user has logged off.
My plan is to ask the user "Would you like this service to continue
running after you log off?". If the user answers yes, I want to install
"server.exe" as a service. I've done this successfully in a manual way using
the 'installutil' .NET helper application, but my application will need to
do this in an automated way.
How can I accomplish this? Shall I shell out to a command prompt and
execute installutil against server.exe? Does the user need to be an
administrator of his machine? Can I be 100% certain that if the user has the
..NET framework installed that 'installutil' will be installed as well? If
so, how do I find it? Is there some sort of macro (i.e. %DOTNET_FOLDER% for
example) that will allow me to easily determine the dotnet folder where
'installutil' resides?
Is there any way to get server.exe to execute after a user has logged
off *other* than using a service? I'd appreciate any suggestions.
I'm designing an application in C#. One of the files in my application
is "server.exe". This assembly listens for inbound connections and handles
various incoming requests. I want to give the user of my application the
option to allow server.exe to execute and handle requests even after the
user has logged off.
My plan is to ask the user "Would you like this service to continue
running after you log off?". If the user answers yes, I want to install
"server.exe" as a service. I've done this successfully in a manual way using
the 'installutil' .NET helper application, but my application will need to
do this in an automated way.
How can I accomplish this? Shall I shell out to a command prompt and
execute installutil against server.exe? Does the user need to be an
administrator of his machine? Can I be 100% certain that if the user has the
..NET framework installed that 'installutil' will be installed as well? If
so, how do I find it? Is there some sort of macro (i.e. %DOTNET_FOLDER% for
example) that will allow me to easily determine the dotnet folder where
'installutil' resides?
Is there any way to get server.exe to execute after a user has logged
off *other* than using a service? I'd appreciate any suggestions.