Solved

Setup and Deployment Project - Setting the PATH Environment Variable

Posted on 2004-08-10
3
1,975 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
[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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

740 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