Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Strange path


6 replies to this topic

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 10 April 2006 - 08:36

I build setup for a product, every component has a key file.
After installing this product, when i look into following registry key:
HKLM > Microsoft > Windows > CurrentVersion > Installer > UserData > s-1-5-18 > Components > guid_of_my_component

the path displayed under this registry is strange for few components.
instead of
CODE
C:\Program Files\MyProduct...

it displays
CODE
C?\Program Files\MyProduct...

or
CODE
xx\Program Files\MyProduct...
(replace xx with 2 digit random number)

Can someone explain why/when the path is written to registry like this?
And, how to analyze this path?

ankur
  ankur tyagi

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 19 April 2006 - 06:10

I have some of those in my registry as well, i just never realized that they were there!
Maybe is has something to do with the component attributes?

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 19 April 2006 - 06:53

First thought that strikes me was same, component attributes may be responsible for this. But when i compared two different compnents in my project, both components have exactly similar attributes.
however path of one is displayed in registry as
CODE
C:\Program Files\MyProduct...

and that of other as
CODE
C?\Program Files\MyProduct...
.

This is creating problem for me because i have some other product which may be reading path from these registry keys.

Can someone knows reason for this ??

  ankur tyagi

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 19 April 2006 - 06:58

I have a finding...

When a component does not have a key file, the path in registry is
CODE
C:\Program Files\MyProduct...

But if I set the file, say xyz.ext as key file for component the path in registry is
CODE
C?\Program Files\MyProduct...


why.... sad.gif
  ankur tyagi

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 19 April 2006 - 06:59

Products really shouldnt be reading directly from this key, because the location could change, and did change between earlier versions of Windows Installer. So it might do so in future versions as well.

You should be using MsiGetComponentPath or MsiLocateComponent. If these functions return the "?" in the string, then this is a problem and should be raised for the Windows Installer team.

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 04 May 2006 - 12:24

I am back biggrin.gif
My problem is not resolved.

Actually i was using MsiLocateComponent.
However, when i looked at MsiGetComponentPath it also give the same results.
But see the description of MsiGetComponentPath in WI SDK, it explains the meaning of 'xx' in
CODE
xx\Program Files\MyProduct...


And as we have earlier found the reason of '?' in
CODE
C?\Program Files\MyProduct...


So i think this topic is complete rolleyes.gif
  ankur tyagi

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 04 May 2006 - 12:25

My problem was resolved. It was typo in first line of last posting.
  ankur tyagi