When using RegistrySearch to find the path to the common documents folder (e.g. 'C:\Users\Public\Documents\') it works on most computers but on some computers it failed. I have no idea why it fails or what security setting might be set.
Here is the code for the registry search:
<Property Id="COMMONDOCUMENTSPATH">
<RegistrySearch Id="RegSearchCommonDoc" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" Name="Common Documents" Type="directory" />
</Property>
On my developer pc I'm getting the content of the registry lookup and the msi log file contains the following lines:
Action start 14:17:04: AppSearch.
AppSearch: Property: COMMONDOCUMENTSPATH, Signature: RegSearchCommonDoc
MSI (c) (E8:70) [14:17:04:157]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (E8:70) [14:17:04:157]: PROPERTY CHANGE: Adding COMMONDOCUMENTSPATH property. Its value is 'C:\Users\Public\Documents\'.
Action ended 14:17:04: AppSearch. Return value 1.
On the customers pc the registry lookup failed and the msi log file looks like this:
Action start 12:45:49: AppSearch.
AppSearch: Property: COMMONDOCUMENTSPATH, Signature: RegSearchCommonDoc
MSI (c) (8C:80) [12:45:49:120]: Note: 1: 2262 2: Signature 3: -2147287038
Action ended 12:45:49: AppSearch. Return value 1.
The customers pc is a Windows 7 Enterprise (x64) system. My system is a Windows 7 Pro (x64). The MSI package is Intel (x86).
The customer's user has adminstrator rights on his machine. Here an extract from the msi log:
MSI (c) (8C:80) [12:45:49:020]: Product installation will be elevated because user is admin and product is being installed per-machine.
MSI (c) (8C:80) [12:45:49:020]: Running product '{D7C625A6-20E0-48EF-A372-19569FF9BFBF}' with elevated privileges: Product is assigned.
Any ideas or suggestions how to fix this problem? Or is there another way to determine the Common Documents folder?
Thanks for your help in advance!