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...
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:
Open Group Policy Management Console.
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.
Right-click the GPO, and then select Edit. Group Policy Management Editor opens, and displays the current contents of the policy object.
In the navigation pane, open Computer Configuration\Windows Settings\Security Settings\Public Key Policies\Trusted Publishers.
Click the Action menu, and then click Import.
Follow the instructions in the Certificate Import Wizard to find and import the certificate.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With