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.