?
Solved

Updating Windows environment variables using ClickOnce

Posted on 2006-06-29
2
Medium Priority
?
811 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
whatsit2002 earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 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