Solved

Updating Windows environment variables using ClickOnce

Posted on 2006-06-29
2
785 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
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)…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now