How to uninstall MSI using its Product Code in c#

前端 未结 4 2114
旧巷少年郎
旧巷少年郎 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条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 02:40

    This command works on the command line:

    msiexec /x {3A40307D-6DF2-4412-842F-B1D848043367} /quiet
    

    I haven't tried it in C#, but replacing your arguments with the key shown above should work. You can find the GUID in the registry key for the app you are trying to uninstall.

提交回复
热议问题