[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 569
  • Last Modified:

.NET ClickOnce publishing question

I'm building an application that loads some configuration data from a remote database. Depending on the data that has been loaded, this application will perform different tasks. It will also output log files to the directory it has been installed in.

The configuration id (that tell the database what to settings to pull) is located in Properties.Settings.Default.XXX

I'm looking to use clickonce so that I can easily push updates to the application.

The tricky part here is that, because the application performs differently based on configuration data, there will be multiple instances of this application running on the same machine.

Is it possible to install (and run) the same clickonce application multiple times on the same machine so that the Properties.Settings.Default.XXX settings are able to stay unique? This way once an application is updated it is able to resume operating with these saved settings and pull the appropriate configuration data from my database?

I'd like to, for example, be able to install these applications in directories like:

c:\app1
c:\app2
c:\app3
etc.

Is this possible?
0
mcainc
Asked:
mcainc
  • 4
  • 4
1 Solution
 
Jacques Bourgeois (James Burger)Commented:
Click once installation does not let you choose an install directory.

When you say that settings are "able to stay unique", do you mean unique for each instance of the application, or unique (shared) for all the instances?

There are 2 kinds of settings. Application settings are shared by all users on the computer but are readonly. User settings are independant for each user, but are read and write. There is no way to have different configurations for different instances of the same application running under the same user name.

If you want to have different settings for different instances of the same application, you need to compile and install the application under 3 different names, or use something else than the standard application settings used in .NET.
0
 
mcaincAuthor Commented:
I meant unique for each instance of the application.

Currently (without clickonce) I can run multiple instances of the same .exe and preserve application settings as long as the exes are in separate directories. It's just a pain to manually update each .exe when I've a new version.
0
 
Jacques Bourgeois (James Burger)Commented:
They you will have either to forget about ClickOnce or implement your own configuration system.

Could this settings be readonly, or do they have to be modified by the application?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mcaincAuthor Commented:
They don't necessarily need to be modified by the application. The setting is actually used to load specific configuration data from a database (i.e., .... WHERE config_id = XX). All I need to figure out is a way to be able to run multiple instances of the same application, yet, have them able to use separate config ids.

I suppose clickonce won't let me do this?
0
 
Jacques Bourgeois (James Burger)Commented:
No, ClickOnce won't let you do this.

You have to implement something of your own if you want to use ClickOnce as a deployment system for such needs.

One idea.

Deploy the application along with a launcher application.

You do not start the application itself, you start the launcher. The launcher starts as many instances of the application as you need (look for Process.Start in the documentation), passing each of then the ID as a command parameter (look for CommandLine in the documentation). No need for configuration files.
0
 
mcaincAuthor Commented:
Thanks James,

It is definitely looking like ClickOnce is out. I've found something that looks like it should work perfect for what I'm after http://netsparkle.codeplex.com/

Thanks again for your help!
0
 
mcaincAuthor Commented:
thanks again!
0
 
Jacques Bourgeois (James Burger)Commented:
Good luck.

Keep up posted when you have tried it. I would be interested in knowing if it works well.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now