oleg-shilo / wixsharp

Framework for building a complete MSI or WiX source code by using script files written with C# syntax.
MIT License
1.12k stars 176 forks source link

Registry values are not removed while uninstalling #255

Closed soundarpandiyan closed 6 years ago

soundarpandiyan commented 6 years ago

Hi oleg, first of all i would like to thanks such a great library provided. it would be great helpful if you help on this issue

the below code i'm using also i have tried with different options like ForceDeleteOnUninstall = true, AttributesDefinition = "Component:Permanent=no"}

 var LMOInterfaceServiceProjectSetup =
                    new Project(ProductName,     
new RegValue(RegistryHive.LocalMachine, @"Software\[Manufacturer]\Systems\IDP", "Name", "[ProductName]") { RegistryKeyAction = WixSharp.RegistryKeyAction.createAndRemoveOnUninstall},
 new RegValue(RegistryHive.LocalMachine, @"Software\[Manufacturer]\Systems\IDP", "Path", "[INSTALLDIR]") { RegistryKeyAction = WixSharp.RegistryKeyAction.createAndRemoveOnUninstall },
 new RegValue(RegistryHive.LocalMachine, @"Software\[Manufacturer]\Systems\IDP", "Version", "[AppVersion]") { RegistryKeyAction = WixSharp.RegistryKeyAction.createAndRemoveOnUninstall},
  new Dir(MainDirectory,
                              new DirFiles(MainDirectoryFiles,
                               f => !ExcludedFiles.Any(Extensions => f.EndsWith(Extensions, true))),
                            new Dir(SubDirectory,
                                new DirFiles(SubDirectoryFiles))));  
oleg-shilo commented 6 years ago

It's hard to tell. I suggest you start with the Registry sample. It does proper install and removal of the registry keys without any special stuff to facilitate the removal.

Then you can start modifying the sample to implement your deployment logic. This way you can detect which of your actions triggers the problem.

soundarpandiyan commented 6 years ago

Thanks Oleg, i have sorted out the issue. Sorry another question, i have command line parameters which is working with msi file but not in the boostrapper exe. i have only one msipackage.

oleg-shilo commented 6 years ago

The bootstraper's exe has it's oven command line args policy. If I am not mistaken WiX does not allow direct tunneling the exe's arguments. Instead they are translated into the msiexec args on-fly. Though quite possibly Burn has some customization mechanism that I am just not aware of.