Solved

Setup and Deployment Project - Setting the PATH Environment Variable

Posted on 2004-08-10
3
1,959 Views
Last Modified: 2009-06-27
Hi,

I am building a setup and deployment project using visual studio .NET.  
Is there a way to append a specific path to the existing Path Environment
variable using the registry editor?

Thanks



0
Comment
Question by:vak0413
3 Comments
 
LVL 1

Accepted Solution

by:
hammadraza earned 125 total points
ID: 11769854
You can't do it with registry editor as far as I have the knowledge however you can create a simple consol application which will first get the value of registry key

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment: Path

and then it will append your path to that value and then write the value to registry again. Compile and add the executable to your setup project and then under "Custom actions>Install" add that consol executable. Now setup will automatically run the Consol application during installation and will append the desired path to "Path" variable.
0
 

Author Comment

by:vak0413
ID: 11775036
I currently use an external app as you've mentioned above but really wanted to use the tool's facillity if possible.
Oh well.

Not sure about the rules of this service but I have a follow-on question - Can I cause a system re-boot at the end of the installation using a Dployment Project?
0
 

Expert Comment

by:tazz602
ID: 24728855
The correct answer is yes you can.  In the registry editor in the deployment project, use [TARGETDIR] in your value setting for the key to represent the application install path.  
Example:
[TARGETDIR]application.exe %1
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
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.

707 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

13 Experts available now in Live!

Get 1:1 Help Now