Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setup and Deployment Project - Setting the PATH Environment Variable

Posted on 2004-08-10
3
Medium Priority
?
1,985 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 375 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

722 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