How to uninstall MSI using its Product Code in c#

前端 未结 4 2082
旧巷少年郎
旧巷少年郎 2020-12-02 02:15

I know We can uninstall a windows application using its MSI by passing command arguments as follows,

Process p = new Process(); 
p.StartInfo.FileName = \"msi         


        
4条回答
  •  -上瘾入骨i
    2020-12-02 02:46

    According to MSDN, You can uninstall it using the product code:

    msiexec.exe /x {your-product-code-guid}
    

    When you use the product code, it uses the cached MSI from C:\WINDOWS\Installer.

提交回复
热议问题