views:

68

answers:

2

I would like to make sure that my application is installed in the correct location on the hard drive or allow the user to determine the install location. How can I do that?

Thanks

A: 

The usual way is to present (in whatever form) the default choice that your code has already figured would be suitable and give them a means of accepting or rejecting it. There are a great many ways one can accomplish this. One strategy many employ is to do the very simplest thing and then wait for criticism, and respond to that...

Richard T
LOL. That is similar to one of my beliefs: "it's easier to beg forgiveness than to ask permission."
RobinDotNet
+1  A: 

ClickOnce installs applications to an obfuscated location in the user's profile (C:\Users\[username]\AppData\Local\Apps\2.0\... on my computer); it can't be changed. Installing to the profile allows users with very little privilege to install applications.

If you must let the user choose where the application is installed, you will have to use another method, like an .msi file.

whatknott
Yes - its some sort of hash depending on the assembly and version etc. There is no way to change it (bar 'moving' the user docs location but I've not tried that, plus I am sure the hash would remain). See http://msdn.microsoft.com/en-us/library/142dbbz4.aspx for guidance but you may have to go MSI or similar...
Paul Kohler