Solved

Setup and Deployment Project - Setting the PATH Environment Variable

Posted on 2004-08-10
3
1,978 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

759 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