在打包项目中添加文件msiexec.exe(一般在c:\windows\system32(系统目录中)找到)。
在文件系统视图中选择应用程序文件,在msiexec.exe上单击右键选择“创建快捷方式”,重命名快捷方式为“uninstall”.
更改此快捷方式Argmuments为“/x {产品ID}”,产品ID的值为打包项目的ProductCode属性值。
注:ProudctCode(选择解决方案资源管理根目录如Setup1,再查看属性标签,不是右键属性)

或者是在应该程序中加入下面代码:
string sysroot = System.Environment.SystemDirectory;
System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe", "/x {850FED90-20D0-4EBA-BEDB-3D9DBA25F6EC} /qr");

相关文章:

  • 2022-01-22
  • 2021-07-07
  • 2021-06-20
  • 2018-06-29
  • 2018-07-05
  • 2022-12-23
  • 2021-11-02
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-09-10
  • 2022-02-03
  • 2021-09-08
  • 2021-11-21
  • 2022-12-23
  • 2021-06-19
相关资源
相似解决方案