Solved

Updating Windows environment variables using ClickOnce

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

12 Experts available now in Live!

Get 1:1 Help Now