Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Add/Remove program questions
 

Add/Remove program questions

When I use clickonce to deploy my smart-client app, it will automatically create an entry to the Control panel Add/Remove program list as well as an entry in the Start Menu. Questions below:

1. How can I uninstall the program if the user doesn't have this authority? This is the NORM in an enterprise environment.

2. I have a Development and Production version of the app. I will deploy a dev or production app whenever one is updated. However, in the Start Menu, Isometimesget 2 entries (one for dev and one for prod), sometimes I get one with the lastest one overwritting the existing one (i.e. production overwritting the dev or vise versa), sometimes the dev will always be there and I can never get the production install to stick. I got all these because I was playing with the version #, installation server, Product Name, etc. So the question is what options in VS are used to control how many start menu items will be created. Ideally I would like to have 2, one for production and one for development. Obviously each will be deployed from different servers.

Thanks
dreamfly  Tuesday, September 18, 2007 8:43 PM

Hi dreamfly,

I don’t think you can uninstall the program if the user doesn't have authority, but you can prevent them from installing the program.

If you want to control which deployments each user can access, you should not allow anonymous access to ClickOnce applications deployed on a Web server. Rather, you would allow users access to the deployments you have installed based on a user's identity (using Windows NT authentication).

For more information, check these articles on MSDN

http://msdn2.microsoft.com/en-us/library/76e4d2xw(VS.80).aspx

http://msdn2.microsoft.com/en-us/library/aa719097(vs.71).aspx#clickonce_topic7

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, September 24, 2007 12:21 PM

I found an answer for #2. The key to having different program entries in the start menu, thus the Add/Remove program list is the certificate. Basically each certificate will associate a program entry. Thus I need 2 certificates, one for Production and one for Development. I just need to switch them for each environment. You can switch them using the Mageui.exe utility. Also atest certificate is automatically created by VS and you can create more for free. Just click the Signing Tab instead of the Publish tab.Each certificate will expire in a year. The solution is here for extending the expiration date

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2143949&SiteID=1&mode=1

Just remember the certificates created by VS does not have passwords. So in the renewcert.exe parm, just don't enter them.

Still searching for answer to #1.

dreamfly  Friday, September 21, 2007 12:31 AM

Hi dreamfly,

I don’t think you can uninstall the program if the user doesn't have authority, but you can prevent them from installing the program.

If you want to control which deployments each user can access, you should not allow anonymous access to ClickOnce applications deployed on a Web server. Rather, you would allow users access to the deployments you have installed based on a user's identity (using Windows NT authentication).

For more information, check these articles on MSDN

http://msdn2.microsoft.com/en-us/library/76e4d2xw(VS.80).aspx

http://msdn2.microsoft.com/en-us/library/aa719097(vs.71).aspx#clickonce_topic7

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Monday, September 24, 2007 12:21 PM

Hi Rong-Chun,

It seems strange that the user can install an app but can't uninstall it. I was hoping that this is just some mis-guided corporate policy that disallows uninstalling apps and I can do it using some ClickOnce api.My logic is if ClickOnce can install over an old version, it should be able to uninstall the current version.

dreamfly  Tuesday, September 25, 2007 1:20 AM

Hi dreamfly,

Sorry, I should make my reply clearer, I don’t mean the users cannot uninstall the program, what I mean is the publisher cannot force the user to uninstall the program. In fact, the user can either uninstall the program or choose to rollback to a previous version in the Add/Remove Programs Dialog.

Hope this helps.
Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Tuesday, September 25, 2007 2:18 AM

You can use google to search for other answers

Custom Search

More Threads

• check database structure when update
• System.ArgumentException while deploying
• How to change the location of the ClickOnce cache ?
• Where are the files?
• Allow Click Once Deployment only for registered Users
• Multiple instance installation.
• ObjectBuilder.dll shows up as prerequsite
• Click Once and SQL Server Express
• Deployment of VB.NET Application Fails
• Auto Deployment Books?