If you made the original MSI you will have access to your PRODUCT-GUID, and that is all you need. The most reliable way would be to programmatically execute the following shell command: msiexec.exe /x String uninstallCommand = (string)installProperties.GetValue("UninstallString") If ((displayName != null) & (displayName.Contains(productDisplayName))) String displayName = (string)installProperties.GetValue("DisplayName") RegistryKey installProperties = products.OpenSubKey(p + (installProperties != null) String productFolders = products.GetSubKeyNames() String productsRoot = products = localMachine.OpenSubKey(productsRoot) RegistryKey localMachine = Registry.LocalMachine I found this code but it doesn't work- public string GetUninstallCommandFor(string productDisplayName) Is it possible to uninstall without using msi file or any setup file. I want to uninstall a software by using my code, I have already tried wmic approach to perform uninstallation but it can't able to find my Software in the system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |