Link to home
Start Free TrialLog in
Avatar of mcainc
mcainc

asked on

.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?
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

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.
Avatar of mcainc
mcainc

ASKER

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.
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?
Avatar of mcainc

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mcainc

ASKER

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!
Avatar of mcainc

ASKER

thanks again!
Good luck.

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