tags:

views:

25

answers:

2

Hi. I need to experiment with windows service's click once reaction. But in publish tab in visual studio I see 1 hour as the most frequent option check. I can't wait so long in order to test click once. I also would like my end users to control this value. Second question. I have n install project that will install about 4 services. However I can't seem to figure out a way to ClickOnce it, I just see how to ClickOnce every single service separately. It is critical to install services in a given order, which install package takes care of (and by the way manually writes some registry values - will that be a problem with ClickOnce?), but will ClickOnce do that (anyway I don't see a way to bundle them up)

A: 

You can't use ClickOnce to install a Windows Service. It doesn't have the privileges required. ClickOnce is designed for desktop applications (WinForms/WPF) and console applications. ClickOnce apps install under the user's profile, not as a system account.

If you want to test for updates more frequently, abandon automatic updates and use programmatic updates instead. Then you can check as frequently as you like.

RobinDotNet
I was curious about your claim that ClickOnce couldn't install a Windows Service (run as admin?), but you are right: http://msdn.microsoft.com/en-us/library/ms973805.aspx#clickoncevsinstaller_topic6
taspeotis
Programmatic updates? Do you mean utilizing ApplicationDeployment class?
Nickolodeon
Well, publish tab gives me an option to publish windows service. Installation won't work, b/c you need admin rights, but update should work theoritically. This is what I whant to test.
Nickolodeon
If it's the publish tab I'm thinking of, it's ClickOnce, and it won't install the service. If you don't install the service with ClickOnce, it won't update the service with ClickOnce.
RobinDotNet
By "programmatic updates", I do mean using the ApplicationDeployment class, but it won't work for a Windows service.
RobinDotNet
taspeotis -- Yes, you run Windows Services under administrative accounts (usually a system account, actually), and there's no way ClickOnce can do that. There's also no UI, so the automatic updating won't work. It's just not designed for that, it's designed for smart client applications.
RobinDotNet