Dears, I hope you are fine and doing well.
Thanks for the answers. They really taught me things. It seems that I can use these when there is no Dialogs. I mean if I write an installer to copy some files with no dialog shown to user, this works. But when I put this code into the WiXUI library to use, everything goes wrong. I mean, I can not assign the Value I get from the registry to the INSTALLDIR which is used in the WiXUI.InstallDir. Is it possible to use this option with WiXUI.InstallDir at all? Do I need to set another thing? (In fact, there will be a problem when we want to show the value to the user to let him change or accept.) This will be the error message: <The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2343.> ---------------------------------------------------------------------- Hi, Read a registry value and assign to a property like so <Property Id='VS2008'> <RegistrySearch Id='VisualStudio2008' Root='HKLM' Key='SOFTWARE\Microsoft\VisualStudio\9.0' Name='InstallDir' Type='raw' /> </Property> Then you will start your directory structure like so <Directory Id='VS2008' Name='.'> <!-- Your directories and components here --> </Directory> Note DirectoryID is the same as the property id.o Regards Stephen > Subject: Re: [WiX-users] Problem Reading Registry > > Please refer to http://www.tramontana.co.hu/wix/lesson1.php, under "1.5 > Where to Install?". It contains a really simple and exhaustive > explanation about this issue. > > Hope this helps, > Boris > Original Messages: > Riyaz Mogharabin wrote: > > Hi everybody, > > > > I have to read a registry value from a specific key ( lets say > > HKLM\Software\Company\ ) and this value contains the path to the > location > > where we need to install the software (so the format of the value >> Will be something like "C:\Company\HomeDir\" ). > > > > How can I get this value by use of <RegistrySearch> Element? How can I > > assign this value to the Directory where I want to install files in? > > > > <Directory Id="TARGETDIR" Name="SourceDir" > > > <Directory Id="CompanyDIR" Name="Company" > > > <Component Id="Components" Guid="<Sample-GUID>" > > > <File Id='file01' Name='SampleFile' /> > > </Component> > > </Directory> > > </Directory> > > > > This means, the Value must be divided into the directory names, and > > be used in the <Directory> names. But how can I get this value by > <RegistrySearch> > > Element, and how can I divide it? Can anybody give me a sample code? > > > > Also I must add that I use "wix-2.0.5805.0" as the stable version. > > > > Thank you very much, ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users