Thanks for your suggestions bob.
> The answer to most every MSI-related question is "check a verbose log." A 
> verbose log on MSI 3.x contains entries for every property change or 
> deletion so you can see when MSI is setting it.

I was doing that, but was obviously too tired to make sense of it.  When I 
looked last night, it just wasn't setting the values; only using defaults. 
Not having a working install sample that I knew to work, it was difficult to 
know what a good log looked like.


>> First, I try to read in the properties at the top of the file from the 
>> registry:
>>     <Property Id="CEAPPMGRDIR" Value="c:\defaultdir\">
>>       <RegistrySearch Id="CEAPPMGRDIRreg" Root="HKLM" Type="directory"
>>                       Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App 
>> Paths\CEAPPMGR.EXE" Name="c:\crud\crud\myapp.txt"></RegistrySearch>
>>     </Property>
>>
>


> The MSI doc is woefully inadequate when it comes to the types of registry 
> searches but I can tell you with high certainty that it won't convert a 
> file path to a directory. It's likely never setting your property, because 
> it doesn't match what you've told it to look for.

Starting again fresh today, I've tweaked it piece by piece, and come up with 
this:

    <Property Id="CEAPPMGR">
      <RegistrySearch Id="CEAPPMGRCMD" Root="HKLM" Type="raw"
                      Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App 
Paths\CEAPPMGR.EXE" ></RegistrySearch>
    </Property>
    <Property Id="CEAPPMGRDIR">
      <RegistrySearch Id="CEAPPMGRD" Root="HKLM" Type="file"
                      Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App 
Paths\CEAPPMGR.EXE" ></RegistrySearch>
    </Property>

Strangely, the raw type reads the whole string (I was expecting extra 
characters on the front specifying the type of information contained, but on 
re-reading, I see regular strings aren't decorated), and the file type reads 
the path portion.  If you use directory, nothing is read, as you suggested.

Then to install files into the found location, use this fragment
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="CEAPPMGRDIR">
     <Directory Id="MFR" Name="Wieser Software Ltd">
      <Directory Id="INSTALLLOCATION" Name="Prog">
       <Component Id="ProductComponent" Guid="MYGUIDHERE">
              <File Id="MainProgram"  Name="prog.cab"
                    Source="prog.cab" DiskId="1"  >
              </File>
              <File Id="ReleaseTxt" Name="release.txt" 
Source=".\release.txt" />
       </Component>

      </Directory>
     </Directory>
      </Directory>
  </Directory>

as shown before.

It took me awhile to realize that you could use other names that were 
previously set as the ID without specifying a name, as is the case in the 
use of CEAPPMGRDIR above.

This raises a question about SouruceDir, which I've started another topic 
on.
The other thing that puzzled me was the use of the name "SourceDir" above, 
which is required.  What I don't understand is why the other folders are 
listed below this in the hierarchy. 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to