Solved

Updating Windows environment variables using ClickOnce

Posted on 2006-06-29
2
790 Views
Last Modified: 2009-12-16
I am deploying a .NET Windows Application, written in C#. As part of the installation process, I would like to set some Windows environment variables to values that the user specifies. I could use Windows Installer to do this, but is it possible in ClickOnce? If so, could you point me to a tutorial or give me a hint on how to do it?

Thanks.
0
Comment
Question by:xelia
2 Comments
 
LVL 7

Accepted Solution

by:
whatsit2002 earned 500 total points
ID: 17077451
Unfortunately, you just don't have that kind of control with a ClickOnce application. As you seem to know, an MSI based installation could fire off a custom Installer class, but ClickOnce has no such capabilities.

Another hitch is that when a ClickOnce app is installed, it isn't installed on the machine level. It is only installed on the user level, so every user that logs into a machine must install the application separately.

My only suggestion is to put code into your ClickOnce app to do the following:
When your application loads, check to see if this is the first time the user has run it (use a registry key or something). If so, prompt them for the required information and set the variables then. Also, after setting the variables, set your registry key (or whatever you checked to see if this was the first time the app was run) so that the user doesn't have to go through the setup process again.

Other than something like that, I don't know of a way to get a ClickOnce install to do what you're looking for.
0
 

Author Comment

by:xelia
ID: 17106416
Thanks whatsit2002. Your suggestion will be very useful.
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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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