views:

2281

answers:

5

How to I configure click-once to install apps for all users. On another forum I got to 'use MSI' - thanks - but how. Also, the first installing user may not be admin - which may be a problem. And I want all users to trigger an update check. No local storage, it's a WPF client to a WCF service.

We're XP, internal.

A: 

check out WIX http://wix.sourceforge.net/

Greg Dean
thank - looks good also. Might try this 1st, then Keith's as a fall back.
tdrake
lol @ the down vote
Greg Dean
+5  A: 

ClickOnce cannot be installed the way you are thinking since to launch it, it is just a URL (http://server/myapp/myapp.application). Thus if you can get a user to click on the URL, you've accomplished the same thing. Here's what we did and it works really well.

We manage 5,000 desktops in a large enterprise and what we did to get the app on all of the machines, was create a simple MSI file that put an icon on the desktop (you could put it in the startmenu or whatever I guess). The icon has the standard app icon and is merely a link icon which points to the URL.

When a user clicks the icon, it launches the application and gets installed, thus all automatic updates come down as well.

Now this worked for us because we have really good enterprise management software to be able to deploy MSI's to the enterprise. I don't know your situation so I don't know if this will work or not.

Building an MSI of the complete app defeats the purpose of the auto updates and things ClickOnce provides. Building a MSI to drop an icon on a machine is simple and just has to be installed once.

If you need any help or have questions on this, just email me, I'm pretty easy to find, just check my blog.

Hope that helps.

-Keith

Keith Elder
Hi Keith - love the lateral thinking. I think that maybe a nice solution - we'll have to play with AD roles to ensure the right people get the link, but I think we can manage this - the autoupdate is too important to lose.
tdrake
+1  A: 

If you need to install / upgrade for all users on a PC, Clickonce is not an option. Clickonce is meant for installing an application for a single user without administrative rights.

You will need to create a MSI installer to distribute an application to multiple users on the same machine. There are multiple ways to deploy and update applications on clients when the client does not have administrative rights. A few examples:

  • Advertise your MSI in Active Directory, installation and upgrade does not require administrative privileges.
  • Use System Center Update Publisher (SCUP) to publish your application to Windows Server Update Services (WSUS). With WSUS you can deploy Microsoft updates, and your application. Both WSUS and SCUP are freely available for download.
  • Use Group Policy to elevate installers (not a recommended solution!), to enable non-admins to install MSIs for all users

Hope this helps.

Jeroen Landheer
A: 

Hey dude l think that u nid to use the setup and deployement option in vb .net add a set up project and create your MSI file there

A: 

Keith Elder has some good points. If you're delivering your app across an Enterprise and need to install updates quickly, then following his advice is probably best.

If you're distributing your apps to customers and want a more traditional "all user" install then you should use installer software (NSIS, InnoSetup, WiX, etc.) and either a 3rd party updater or build your own updater.

Let me start by saying we offer a complete updating solution which includes:

wyUpdate handles all of the Vista/Windows 7 UAC problems and all the file permission problems that inevitably pop up when you're trying to update complex software.

That being said, if you want to build your own updater here are some tips:

Building your own updater

A good place to start is the wyUpdate C# source code I mentioned above. You can cannibalize it and use it for your own purposes. Some of the algorithms it contains:

  • Full Windows Vista / Windows 7 UAC support
  • Ability for limited users to check and then update if they have credentials
  • Support for wonky corporate inernet. (If you've ever worked with a corporation this is a real problem).
  • Quick extracting, patching, and installing of files.
  • Registry support.
  • Roll back files & registry on error or cancellation by the user
  • Self-update

We also have the file specifications here.

Automatic updating

Since being automatic is a requirement let me tell you how we do it with our AutomaticUpdater control.

We use named pipes to communicate between the standalone updater (wyUpdate) and the Automatic Updater control sitting on your program's form. wyUpdate reports progress to the Automatic Updater, and the Automatic Updater can tell wyUpdate to cancel progress, to start downloading, start extracting, etc.

This keeps the updater separate from your application.

In fact, the exact named pipes C# code we use is included in an article I wrote a little while back: Multi-process C# app like Google Chrome.

Wyatt O'Day