Solved

.NET ClickOnce publishing question

Posted on 2011-09-10
8
558 Views
Last Modified: 2012-06-21
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
Comment
Question by:mcainc
  • 4
  • 4
8 Comments
 
LVL 40
ID: 36518559
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
 

Author Comment

by:mcainc
ID: 36518586
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
 
LVL 40
ID: 36519059
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:mcainc
ID: 36520148
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
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 36520591
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
 

Author Comment

by:mcainc
ID: 36520649
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
 

Author Closing Comment

by:mcainc
ID: 36520650
thanks again!
0
 
LVL 40
ID: 36520996
Good luck.

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SqlDataBase 7 48
Modal Popup Extender control 1 20
Regular expression help 2 25
VB.NET 2008 - SQL Timeout 9 24
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question