Here is what I use to save off the databasehost name provided at install time 
so it will be set automatically to the correct value during uninstall 
processing.

    <Property Id="DATABASESHOST" Value="[%ComputerName]">
<!-- Any public property default values that were overridden at install time 
are not automatically
overridden with the same value at uninstall time.  Therefore for any public 
property values that you
also need to use during uninstall you need to store the value of them that was 
used at install time
so that it can be read and used at uninstall time. -->
        <RegistrySearch Id="DatabasesHostSearch1" Type="raw" Root="HKLM"
            Key="$(var.SoftwareKey)\Microsoft\!(loc.ProductKey)" 
Name="DATABASESHOST" />
    </Property>

For $(var.SoftwareKey) assignment I have the following in place.

    <?if $(var.Platform) = "x64" ?>
        <?define Win64 = "yes" ?>
        <?define SystemFolder = "System64Folder" ?>
        <?define SystemFolderX86 = "SystemFolder" ?>
        <?define SoftwareKey = "Software" ?>
        <?define SoftwareKeyX86 = "Software\Wow6432Node" ?>
        <?define ProgramFilesFolder = "ProgramFiles64Folder" ?>
        <?define ProgramFilesFolderX86 = "ProgramFilesFolder" ?>
        <?define DotNetFramework35Folder = 
"[%SystemRoot]\Microsoft.NET\Framework64\v3.5\" ?>
        <?define DotNetFramework20Folder = 
"[%SystemRoot]\Microsoft.NET\Framework64\v2.0.50727\" ?>
    <?else?>
        <?define Win64 = "no" ?>
        <?define SystemFolder = "SystemFolder" ?>
        <?define SystemFolderX86 = "SystemFolder" ?>
        <?define SoftwareKey = "Software" ?>
        <?define SoftwareKeyX86 = "Software" ?>
        <?define ProgramFilesFolder = "ProgramFilesFolder" ?>
        <?define ProgramFilesFolderX86 = "ProgramFilesFolder" ?>
        <?define DotNetFramework35Folder = 
"[%SystemRoot]\Microsoft.NET\Framework\v3.5\" ?>
        <?define DotNetFramework20Folder = 
"[%SystemRoot]\Microsoft.NET\Framework\v2.0.50727\" ?>
    <?endif?>


-----Original Message-----
From: Brian Rogers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2008 3:43 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to Keep the Property value along with MSI

Hey Sandeep,

I imagine that you could have a registry entry that sets the value of the
property and you could have registry locator that reads that value. Check
your state and when doing an uninstall use that registry locator value?

Thanks,

--
Brian Rogers
"Intelligence removes complexity." - Me
http://icumove.spaces.live.com

On Mon, Sep 22, 2008 at 3:39 PM, Sandeep Gautam (HCL Technologies Ltd) <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> While Installing , I am passing One Data base server name along with One
> property. But while uninstalling, It is giving error because it is looking
> for data base name. So I want to save the value of the property so that I
> can use the same on uninstallation.
>
> Regards
> Sandeep
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to