/build/static/layout/Breadcrumb_cap_w.png

Path Statements in the registry

I was proofing a package for an engineer and noticed paths to an executable for the application in the HKLM\Softtware\Microsoft\Windows\CurrentVersion\App Paths.
Should these entries be placed in the wise path \ environment variable table?
This is way I have always performed path statements and now suddenly I have been told that it is the incorrect procedure...please do not tell me that I wrong! :-)
I thought the registry keys could be overwritten by another product...?
I have been looking for some references to back me up (Even John McFadyen's blog) with no success.

0 Comments   [ + ] Show comments

Answers (9)

Posted by: AngelD 15 years ago
Red Belt
0
The "App Paths" registry entry isn't the same as the Path environment variable thus used in a similar way.

I thought the registry keys could be overwritten by another product...?
Sure they can as everything else so it's up to the packager to handle conflicts between the packages.

There is a list of search order while searching for executables thus don't have it here but if I recall the Path env. variable is used prior to "App Paths" if not found.
Posted by: tron2ole 15 years ago
Third Degree Blue Belt
0
Firstly, thanks for your quick response AngelD!

So really apart from the search order, there is no other difference...I wonder which is most preferred method, if the search order is not in consideration.?
For some reason, whenever I have captured those AppPath registry keys, I have removed them and placed additional env variables instead...
Posted by: AngelD 15 years ago
Red Belt
0
I wouldn't replace them but just let them be specified under "App Paths" instead.
The Path env. variable has a max limit which you should take in account, see below.

A returned path environment variable is truncated to 1,024 bytes on a Windows Server 2003-based or Windows XP-based computer
http://support.microsoft.com/kb/906469
Posted by: tron2ole 15 years ago
Third Degree Blue Belt
0
Thanks for the reference, now I can show how I was wrong! :-) Justy kidding..
Very interesting as now I can be more flexible with my captures in wise and keep the path variables related to the application.
I did not know that the maximum size available for a environment variable function was 2,048 bytes although I do not think that I would ever reach that ammount...
Thanks again for your help AngelD with such a fast response too...
Posted by: AngelD 15 years ago
Red Belt
0
So really apart from the search order, there is no other difference
I'm sure there are some other differences, one that comes in mind is the default workdir as it's also specified under the "App Paths" key.
Posted by: anonymous_9363 15 years ago
Red Belt
0
Remember also that, if you use PATH, you really ought to use the User path rather than System, as the latter will require a system restart before it takes effect. This is one of the common reasons why vendor MSIs force reboots - because the original packager was too lazy to work that out. We'll leave aside the vendor's developer's idleness in requiring an addition to the PATH in the first place...
Posted by: AngelD 15 years ago
Red Belt
0
A reboot when a System env. variable may depend
http://support.microsoft.com/kb/104011

Using the User Path env. variable has one "defect", it will not be removed while the uninstall is performed by another user such as an admin.
Posted by: anonymous_9363 15 years ago
Red Belt
0
ORIGINAL: AngelD
A reboot when a System env. variable may depend http://support.microsoft.com/kb/104011
Sending the update message is something that you'd imagine would be de rigeur for Windows Installer, right? I gave up banging that drum in the MSDN forums many, many moons ago. From what I've read so far, it isn't in WI 4.0, either. You cannot know the depths of my contempt for Microsoft with regards to this kind of thing. It beggars belief, it really does...

I would have mentioned the above in my response but figured that, if the OP was struggling with the difference between 'App Path' and PATH, authoring a DLL to broadcast the update message was probably a stretch too far. :)
Posted by: AngelD 15 years ago
Red Belt
0
ORIGINAL: VBScab
authoring a DLL to broadcast the update message was probably a stretch too far.

It's a first time for everyone [:D]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ