elbert
elbert

Reputation: 47

Custom ClickOnce installation path

Is there a way to set the ClickOnce client installation folder to something static like "...\%User%\Appdata\Local\%MyProgram%?

Detailed info:
I am using ClickOnce to distribute an intranet application. Everything works fine, and the application installs and updates like it should. The one issue I am running into is one of the modules in the application moves files from one folder to another folder. The end user has Trend Micro installed, and the application was getting nuked and quarantined every time the module ran. I had the IT department whitelist the application, but due to the random installation path below "...\AppData\Local\Apps\2.0...", and because Trend Micro can't handle the '.' in 2.0, they were having to whitelist the executable below the "\Local\Apps\" folder, which they weren't comfortable doing. Is there a way to change the ClickOnce installation folder to something like "...\%User%\Appdata\Local\%MyProgram%?

Upvotes: 1

Views: 408

Answers (1)

slugster
slugster

Reputation: 49974

Simple answer: no you cannot change that path, it is a key part of the sandboxing that is a feature of ClickOnce. Even with custom manipulation and re-signing of the ClickOnce manifests you cannot alter that path (this is one of the ways that ClickOnce allows you to have multiple published instances installed on your machine even if they are the same version).

I'd suggest that before packaging (i.e. as part of your release build process) you sign your binaries with a code signing certificate from Verisign or similar - anti virus products typically use this as an indicator of whether something can be trusted. If that fails to solve the problem then look at whether you can whitelist based on the file name rather than the file path.

Upvotes: 1

Related Questions