Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ClickOnce app without prompting the user?

Tags:

clickonce

Is there a way to install a ClickOnce application without prompting the user at all? I'm talking about the "Run/Don't Run" that a user gets the first time he/she runs the application.

There seem to be some clues here but I believe it's about skipping the "Elevation" (UAC) and security prompts, and not the actual initial "Run/Don't Run" screen.

I can only find information about how to silently update an application that's been installed in the past, but nothing about silently installing an application for the first time.

I also found this post which seems to be related, but again, not sure if we're talking about the same user prompt...

like image 949
Joe Avatar asked Feb 06 '13 14:02

Joe


1 Answers

It's possible to avoid the "Run"/"Don't Run" prompt, although you still have the issue of actually copying the files over to the user, which usually requires them launching the .application through a link. However, you may be able to launch it through a login script or something along those lines. Presumably you have solved that problem somehow as it is implied in your question that you have. The other question you linked to hovers around this but it doesn't really get you all the way.

I know you can bypass the "Run"/"Don't Run" prompt because I just did it successfully with a ClickOnce we deploy as a custom shell on kiosk machines. The key is that the ClickOnce has to be signed by a trusted publisher. Even self-signed is okay if you have the right stuff configured on the client machine.

So, have the network administrators push out a group policy that trusts the code-signing certificate that is being used to sign your application. There's information on how to do that at TechNet here: http://technet.microsoft.com/en-us/library/cc770315(v=WS.10).aspx, reproduced here briefly:

  1. Open Group Policy Management Console.

  2. Find an existing or create a new GPO to contain the certificate settings. Ensure that the GPO is associated with the domain, site, or organizational unit whose users you want affected by the policy.

  3. Right-click the GPO, and then select Edit. Group Policy Management Editor opens, and displays the current contents of the policy object.

  4. In the navigation pane, open Computer Configuration\Windows Settings\Security Settings\Public Key Policies\Trusted Publishers.

  5. Click the Action menu, and then click Import.

  6. Follow the instructions in the Certificate Import Wizard to find and import the certificate.

  7. If the certificate is self-signed, and cannot be traced back to a certificate that is in the Trusted Root Certification Authorities certificate store, then you must also copy the certificate to that store. In the navigation pane, click Trusted Root Certification Authorities, and then repeat steps 5 and 6 to install a copy of the certificate to that store.

like image 111
MikeBaz - MSFT Avatar answered Sep 22 '22 11:09

MikeBaz - MSFT