开发者

Is it possible to automate a ClickOnce deployment?

I work on a project consisting of a server and a client application deployed via ClickOnce. The client is installed the first time a user clicks a http://...file.application link, and the interaction with the user during installation are minimal (just the standard ClickOnce install/don't install dialog box).

One of our client wants to be able to automate the installation of the client on the users' machines. Is there a way to install the ClickOnce application without any user interaction, in order to automate the deployment process?

Does software providing this kind of deployment exist?

My problem co开发者_如何学编程mes from the fact I don't know how the ClickOnce deployment works under the hood (I don't even know if it is possible to run an ClickOnce installer from the command line...), and as ClickOnce applications are not packaged at all like Windows Installer, I am not sure of anything.


There are many third-party solutions available for automated deployment. You can also create your own scripts, but you need some way of invoking them. If your clients' machines are configured to look for network located start up scripts then this would be an ideal method. Typically, automated deployments work with a standard deployment package, i.e. containing a setup.exe and required files, so this would probably be the best way to package your application.

ClickOnce is specifically designed for manual deployment by an end user and only confuses things when the goal is automated deployment. Obviously you can keep your ClickOnce deployment in place in case someone wants to install your application manually, but it will make things easier if you package it separately for automated deployment.


It's possible to automate it. The trick is the way the manifests are generated and signed.

Once an application manifest has been built and the deployed files are renamed, you have a set of files and folder that you can just copy to your install source.


You can build a standard MSI installer and deploy it via Group Policy, but then updates are a little trickier. As a hybrid, you could build an MSI installer (deployed via Group Policy) that just installs a shortcut to the correct ClickOnce address on the desktop. In this way, the user always runs the ClickOnce version, which is guaranteed to be up-to-date when they run it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜