none
ClickOnce deployment with custom install directory?

    Question

  • Hi,

    I am trying to deploy an application with ClickOnce, but I can't install it to the Documents and Settings folder since that folder is wiped upon logging out (done by a script in the domain). This means I'd like to tell ClickOnce to install to another folder, preferrably C:\Program Files. Is this at all possible?

    Thursday, November 02, 2006 7:49 AM

Answers

  • Sorry, but the answer is no, not possible. A specific design goal of ClickOnce was to ensure that no ClickOnce install could harm another app or data on the machine. The only way to guarantee this is the isolate each install into an auto-created directory.

    If you need to explicitly place files somewhere else, you really have two main options:

    - Skip ClickOnce and do a normal install with the Updater Application block to do updates

    - Use a ClickOnce install to get it onto the users machine, and then using custom startup code in your app, move the files to where you need them to be. This sort of violates the intent of ClickOnce, but could work depending on your requirements.

    Thursday, November 02, 2006 4:56 PM

All replies

  • Sorry, but the answer is no, not possible. A specific design goal of ClickOnce was to ensure that no ClickOnce install could harm another app or data on the machine. The only way to guarantee this is the isolate each install into an auto-created directory.

    If you need to explicitly place files somewhere else, you really have two main options:

    - Skip ClickOnce and do a normal install with the Updater Application block to do updates

    - Use a ClickOnce install to get it onto the users machine, and then using custom startup code in your app, move the files to where you need them to be. This sort of violates the intent of ClickOnce, but could work depending on your requirements.

    Thursday, November 02, 2006 4:56 PM
  • Well, then I'll just have to switch deployment method to use a MSI package and SMS instead. Thanks.
    Friday, November 03, 2006 7:01 AM
  • Read this Article!

    This solves your query

    http://www.codeproject.com/KB/install/DDayUpdate_Part1.aspx

    It uses the benefits of ClickOnce and MSI

    Wednesday, April 02, 2008 7:56 PM