473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

VS Setup Project...

Hi, Folks.

I am trying to add [TARGETDIR] to the Environmental Variable %PATH
% for a console application written in C#.
I know the path for Win2k/XP is stored in the System Registry
under H_KEY_LOCAL_MACHINE but all I seem to be able to do is replace
the %PATH% variable with the Registry Editor within the project. Does
anyone know how I can *append* to the path instead?
TIA...

Nov 6 '07 #1
4 2305
Read in the existing key to a string. Append your new path. Then write the
new value out to the registry key.

--
Andrew Faust
http://www.andrewfaust.com
"Blue Streak" wrote:
Hi, Folks.

I am trying to add [TARGETDIR] to the Environmental Variable %PATH
% for a console application written in C#.
I know the path for Win2k/XP is stored in the System Registry
under H_KEY_LOCAL_MACHINE but all I seem to be able to do is replace
the %PATH% variable with the Registry Editor within the project. Does
anyone know how I can *append* to the path instead?
TIA...

Nov 6 '07 #2
On Nov 6, 11:12 am, Andrew Faust <andrew [at] andrewfaust.comwrote:
Read in the existing key to a string. Append your new path. Then write the
new value out to the registry key.

--
Andrew Fausthttp://www.andrewfaust.com

"Blue Streak" wrote:
Hi, Folks.
I am trying to add [TARGETDIR] to the Environmental Variable %PATH
% for a console application written in C#.
I know the path for Win2k/XP is stored in the System Registry
under H_KEY_LOCAL_MACHINE but all I seem to be able to do is replace
the %PATH% variable with the Registry Editor within the project. Does
anyone know how I can *append* to the path instead?
TIA...- Hide quoted text -

- Show quoted text -
Thanks, dude!

Sometimes it takes someone else to point out the obvious.

Nov 6 '07 #3
On Nov 6, 11:40 am, Blue Streak <rdlebre...@hotmail.comwrote:
On Nov 6, 11:12 am, Andrew Faust <andrew [at] andrewfaust.comwrote:


Read in the existing key to a string. Append your new path. Then write the
new value out to the registry key.
--
Andrew Fausthttp://www.andrewfaust.com
"Blue Streak" wrote:
Hi, Folks.
I am trying to add [TARGETDIR] to the Environmental Variable %PATH
% for a console application written in C#.
I know the path for Win2k/XP is stored in the System Registry
under H_KEY_LOCAL_MACHINE but all I seem to be able to do is replace
the %PATH% variable with the Registry Editor within the project. Does
anyone know how I can *append* to the path instead?
TIA...- Hide quoted text -
- Show quoted text -

Thanks, dude!

Sometimes it takes someone else to point out the obvious.- Hide quoted text -

- Show quoted text -
Spoke too soon...

How do you setup a variable in a Setup Project (MSI)?

Nov 6 '07 #4
On Nov 6, 12:55 pm, Blue Streak <rdlebre...@hotmail.comwrote:
On Nov 6, 11:40 am, Blue Streak <rdlebre...@hotmail.comwrote:


On Nov 6, 11:12 am, Andrew Faust <andrew [at] andrewfaust.comwrote:
Read in the existing key to a string. Append your new path. Then write the
new value out to the registry key.
--
Andrew Fausthttp://www.andrewfaust.com
"Blue Streak" wrote:
Hi, Folks.
I am trying to add [TARGETDIR] to the Environmental Variable %PATH
% for a console application written in C#.
I know the path for Win2k/XP is stored in the System Registry
under H_KEY_LOCAL_MACHINE but all I seem to be able to do is replace
the %PATH% variable with the Registry Editor within the project. Does
anyone know how I can *append* to the path instead?
TIA...- Hide quoted text -
- Show quoted text -
Thanks, dude!
Sometimes it takes someone else to point out the obvious.- Hide quoted text -
- Show quoted text -

Spoke too soon...

How do you setup a variable in a Setup Project (MSI)?- Hide quoted text -

- Show quoted text -
Okay, I'm starting to look like an idiot...

But I found the answer!!!

1) In Visual Studio open the Registry Editor for the Setup Project
2) Create a path to: HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \
Control \ Session Manager \ Environment
3) Create a string value called "Path" with the value of "[%Path];
[TARGETDIR]"

[%Path] contains the existing environmental variable. This action
will *append* the Target Dir to it.

Nov 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Scott Kaszyk | last post by:
I have created a setup project and was able to include the exe as well as the source code in the install. However, I have been unable to include the setup project source. Therefore, when I access...
4
by: pbj | last post by:
my application was created in vb.net, vs 2003. the setup project was also created in vs 2003. one of my application reviewers reported this: The .Net link that is included in the setup is not the...
2
by: serge calderara | last post by:
Dear all, I have build a setup project for my VB.NET application, I need to know the installation path of an application in order to add file in it. How can do that inside my setup project ?...
4
by: Nick | last post by:
Hi, I have a windows application, wherein the solution consists of 5 projects. When I try to create a setup and deployment project for this solution, I'm somehow unable to add anything in...
1
by: JJ | last post by:
Hi, I have gone the setup project route and added the setup project to my solution as in the guide. I have checked the dependancy's and they all seem to be there. Now do I just build the project...
0
by: Adam Clauss | last post by:
I have a C++ COM Addin I wrote for Outlook (2002) using VS.Net 2002. Having completed it, I am now looking to create a setup project and install it on another machine. I created a setup project...
4
by: Howard Kaikow | last post by:
When I build a setup project, the dependency in the setup project is tied to the version in which it was built. Is there a way to build a setup project that can be used in both versions of the...
1
by: rohan_from_mars | last post by:
I have a windows service and am also using Enterprise Library June 2005 version. Now i have created Setup and Deployment Project which installs the service. but how do i add EL dlls-...
6
by: andrewbb | last post by:
I want to deploy a service with a windows app and the setup program must conform to the Vista certification requirements. Can that be done with the standard .net setup project? Assuming cost is...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.