Skip to content

How to get directory by DirectorySearch? #6791

Discussion options

You must be logged in to vote

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 attribute Name of RegistrySearch is wrong, that must same to the registry item name(In my case,there should have no attribute Name), and then I could get the folder path of excel.exe. The DirectorySearch 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…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@robmen
Comment options

@MasterBran
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MasterBran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants