ClickOnce Install Mode Application Available offline

Add-in Express™ Support Service
That's what is more important than anything else

ClickOnce Install Mode Application Available offline
How do I enable the install mode for click once using the offline mode? 
Mark McCray




Posts: 17
Joined: 2010-04-15
Hi,

For our main application we use clickonce with the install mode set to "The application is available offline as well". We then copy the publish folder to our clients server, almost always a different folder name than we published, and everything works great. Updates work, it is perfect for our model.

How can I do this with ADX? The Publish ADX project does not offer this option and when I try to install from a different location I get errors.

I was thinking about trying just a standard publish, but I wanted to ask here before looking for alternatives.

Thanks!

Mark
Posted 01 Jul, 2015 11:35:08 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Mark,

ClickOnce doesn't support deploying COM add-ins. So you can't use the standard publish.
Do you run the .application file or setup.exe when you install the add-in from the different location?
Posted 02 Jul, 2015 05:57:57 Top
Mark McCray




Posts: 17
Joined: 2010-04-15
I use the setup.exe. Not sure what you mean by the .application.

I installed WIX and tried the click twice route and I can run the .msi fine, but the setup still gives me an Invalid URL message when run on the client computer and I cannot set the URL to be a file path. Basically I need the update location to be wherever the install ran from initially, which is what the standard click once allows me.

To reiterate, I need to install the click once at a client company, then each of those company's users installs from the company location. Currently that is simply a file share using standard click once, not a URL, and subsequent updates to the file share updates all users.

I was not aware of the COM limitation of click once, so this may mean I cannot use this method for my add-ins, but I am open to suggestions on how others have handled this? I was hoping to not have to write it in to my main application.

Thanks for all your attention. I truly appreciate it.

Mark
Posted 02 Jul, 2015 06:58:44 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Mark,

setup.exe is built using msbuild and it uses the hard-coded provider url. To install the ClickOnce application from different locations you need to run <app name>.application file on the user's PC (this is the deployment manifest).

You can change the provider url of the setup.exe file via the command line: setup.exe -url=<location>.
https://msdn.microsoft.com/en-us/library/h4k032e1.aspx
However, in this case you will have to re-sign the setup.exe with the digital signature again. It can be done via the signtool.exe.
Posted 02 Jul, 2015 09:33:37 Top
Mark McCray




Posts: 17
Joined: 2010-04-15
Hmm, ok. I can't see doing that at every customer site. I guess I am stuck with the standard MSI installer and I will have to manually notify the users when an update is available.

Thanks for all the info!

Mark
Posted 06 Jul, 2015 07:01:55 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Mark,

Consider this approach. You use ClickTwice to deploy and update your add-in. In the Preferences dialog (see section Preferences at https://www.add-in-express.com/docs/net-office-deployment-clicktwice.php), you specify a string (string #1) to be returned by the CheckForUpdates method. An installer of your add-in puts an identifier of the current client on the client's machine (e.g. in the registry), this is string #2. When the CheckForUpdates method is called, it returns string #1; your add-in combines it with string #2 and in this way (probably including some intermediate steps such as visiting a URL constructed using the strings) it accesses the location where you put updates. You publish every update for that specific customer in order to ensure that the ClickTwice downloader will download updates from the specified location. Finally, you deliver the update to that location.

What do you think?


Andrei Smolin
Add-in Express Team Leader
Posted 06 Jul, 2015 09:55:09 Top
Mark McCray




Posts: 17
Joined: 2010-04-15
Andrei,

Thank you for the idea, but as was thinking about this last night it hit me that I was approaching it all wrong.

My add in is basically an extension of my main application. It shares DLL's with that application, therefore when the main application is updated the add-in must also be updated. Instead of a separate install for the add-in, it really should install with my main application.

I can change my main application setup to include all of the additional DLL's needed for the add-in. I will change my main application to detect the presense of Microsoft Office, and if found, register the add-ins.

Can you point me to the documentation or give me a brief summary of what I need to do in the main application to register it as an add-in in Office, especially what ADX components need to be registered?

Thank you all again for your help, it is very appreciated.

Mark
Posted 07 Jul, 2015 06:02:33 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Mark,

What you need is to deliver the very same files that a setup project that Add-in Express generates would deliver. Then you run adxregistrator.exe as described in section How your Office add-in is registered at https://www.add-in-express.com/docs/net-deploying-addins.php. Note also section Registration-time privileges on that page.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Jul, 2015 06:43:01 Top