Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClickOnce deploy a Windows Service?

Is it possible to deploy a Windows Service using ClickOnce? If so, how do you achieve this?

Currently we have to use a Deployment project, and the installation process could be simplified greatly by using ClickOnce.

like image 806
NoizWaves Avatar asked Jan 20 '09 04:01

NoizWaves


People also ask

How do I ClickOnce deployment?

In the Publish wizard, select Folder. In the Specific target page, select ClickOnce. Enter a path or select Browse to select the publish location. In the Install location page, select where users will install the application from.

Is ClickOnce still supported?

ClickOnce and DirectInvoke are supported out of the box for all Windows users. Users that want to disable ClickOnce support can go to edge://flags/#edge-click-once and select Disabled from the dropdown list. You'll have to Restart the browser.

What is the difference between ClickOnce deployment and Windows Installer deployment?

Windows Installer deployment requires administrative permissions and allows only limited user installation; ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application.


2 Answers

AFAIK you can't really use ClickOnce end-to-end to deploy a service; there are issues with both the file locations (ClickOnce installs into a user's profile) and installation (ClickOnce is largely side-effect free).

You can, however, write a service as an exe that can self-install/uninstall from the services list, like so; basically, you write it as as a console exe and handle some command line args, using AssemblyInstaller to [un]install from the current assembly. Another advantage is that the same approach can be used to help debugging, since you can run it from the command line.

like image 178
Marc Gravell Avatar answered Sep 21 '22 21:09

Marc Gravell


I guess NO according to Choosing Between ClickOnce and Windows Installer

like image 45
OrElse Avatar answered Sep 19 '22 21:09

OrElse