如何在Visual Studio中安装MyProgram.exe,同时在c#中创建包 [英] How to include Uninstall MyProgram.exe in visual studio while creating package in c#

查看:205
本文介绍了如何在Visual Studio中安装MyProgram.exe,同时在c#中创建包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个wpf应用程序并为此创建了安装程序。我正在使用Windows安装程序来创建安装包。现在我想在安装我的软件包之后,在开始菜单中包含卸载MyProgram.exe。

我可以在安装后添加exe来运行我的程序。我想在开始菜单中包含卸载MyProgram.exe,自述文件,帮助文件。

任何建议,请帮助我。
提前感谢
Ibrahim。

I have developed a wpf application and created setup for that. I am using windows installer for creating setup package. Now I want to include uninstall MyProgram.exe in start menu after installing my package.
I am able to add the exe to run my program after installation. I want to include uninstall MyProgram.exe, ReadMe file, Help File in start menu.
Any suggestions plz help me regarding this. Thanks in advance, Ibrahim.

推荐答案

创建安装包时,将分配唯一的ID (产品编号,如果我不忘记)。您可以使用以下行创建批处理文件:

When you create installation package, it is assigned unique id (Product Code, if i'm not forgetting). You can create a batch file with following line:

  @echo off
  start /b /l msiexec.exe /x {Product Code}

现在右键单击文件系统树(在项目的文件视图中),并包括这个批处理文件。分配一个漂亮的图标,并创建条目卸载以启动应用程序的菜单文件夹。

Now right click on file system tree (in files view of project) and include this batch file. Assign it a nice icon and create entry "Uninstall " to start menu folder for your application.

ps: - 只需在运行或cmd窗口中输入msiexec.exe即可获得更多选项。
pps: - 产品代码在您的安装项目的属性中可用。在解决方案树中选择安装项目并打开属性选项卡。

ps:- just type msiexec.exe in run or cmd window to get more options. pps:- Product Code is available in properties of your setup project. Select Setup Project in solution tree and open properties tab.

这篇关于如何在Visual Studio中安装MyProgram.exe,同时在c#中创建包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆