How to get directory by DirectorySearch? #6791
-
For some reason, I need to install some file to the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Finally I found the bug and resolve it. |
Beta Was this translation helpful? Give feedback.
-
Maybe that is actually a very simple but possibly overlooked problem, the bug occur in |
Beta Was this translation helpful? Give feedback.
Maybe that is actually a very simple but possibly overlooked problem, the bug occur in
<Property Id="OFFICEPATH"> <RegistrySearch Id="OFFICE" Type="file" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe" Name="InstallDir" /> </Property>
,the attributeName
ofRegistrySearch
is wrong, that must same to the registry item name(In my case,there should have no attributeName
), and then I could get the folder path ofexcel.exe
. TheDirectorySearch
is needless, so this is my final code<Property Id="OFFICEPATH"> <RegistrySearch Id="OFFICE" Type="file" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe" Name="InstallDir" /> </Property> <Set…