Hi,
I didn't understand your question,
What i have understood is- you want to write to registry and you want to
delete that value from registry,
If you want to write to registry
Try this
<Registry Action="createKeyAndRemoveKeyOnUninstall" Id="name_application"
Root="HKLM" Key="SOFTWARE\Application_name\version">
<Registry Action="write" Value="[INSTALLDIR]" Type="string"
/>
</Registry>
And on uninstallation it will automatically remove it from the registry,
Sneha Gharpure wrote:
>
> I have a custom action writeToRegistry and after this action if the user
> presses cancel, the corresponding value should be deleted from the
> registry.
>
> Following is the sample code showing how we have implemented it.
>
> WriteToRegistry -> writes a value to a registry
> DeleteFromRegistry -> deletes a value from registry
> These two are VB scripts that read/write the values from/to the registry.
>
> <CustomAction Id='WriteToRegistry' BinaryKey='keyname'
> VBScriptCall='WriteToRegistry' Execute="immediate" />
> <CustomAction Id='WriteToRegistry_Rollback' BinaryKey='keyname'
> VBScriptCall='DeleteFromRegistry' Execute="rollback" />
>
> 6402 is the sequence number after "publish product"
> the "WriteToRegistry" action is called only during the installation and
> therefore the condition " Not
> Installed". I am not sure about the condition for
> "WriteToRegistry_Rollback". I have tried both- "Installed" and "Not
> Installed"
>
> <Custom Action="WriteToRegistry" Sequence="6402">
> Not Installed
> </Custom>
> <Custom Action="WriteToRegistry_Rollback" Before="WriteToRegistry">
> Installed
> </Custom>
>
> The problem here is that the Roll back custom action is not getting called
> when the user presses "cancel" after executing the "WriteToRegistry"
> action. I think that the problem is due to improper sequencing of these
> custom actions.
>
> Can anyone give any pointer?
>
> Thanks in Advance,
> Sneha
>
--
View this message in context:
http://www.nabble.com/Custom-Action-Rollback-Implementation-tp14948042p14949367.html
Sent from the wix-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users