C#,Visual studio 2010Visual Studio 2010安装项目[ProductName]
我有一个应用程序项目和连接到应用程序的安装项目。 在Setup projects属性中,我已将ProductName属性设置为MyApp。
我在应用程序文件夹两个环节(安装项目), 一个启动项目,一个用于卸载
我使用创建的应用程序文件夹中的卸载程序链接的技术通过 开始我的应用程序用标志和应用产品这样的代码 --uninstall [产品代码]
我不能使用[产品名称]作为链接的名称来启动应用程序,这是为什么? 如果这样,安装项目将在开始菜单 下的应用程序文件夹中创建一个名称为[ProductName]而不是“MyApp”的链接。
如何本地化“删除链接”,今天我将卸载程序链接命名为“删除MyApp”? 我希望那就是有可能做这样的事情“strings.Remove [产品名称]”
是否有可能安装项目以这样的方式我MyApp项目的 安装项目获取应用程序名称连接,MyApp项目中的版本号等。 像
ProjectName = MyApp.properties.Application.AssemblyName
/斯特凡
我明白了,谢谢你的answear
你为什么不使用msiexec.exe的命令行此 设置属性
我正在使用t他MSIEXEC,我调用它在我的应用程序App类这样
sComLine = CommandLine.CL.get("uninstall"); // Check command line if the --uninstall [ProductCode] is given
if (sComLine != null)
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.System);
System.Diagnostics.ProcessStartInfo uninstallProcess = new System.Diagnostics.ProcessStartInfo(path + System.IO.Path.DirectorySeparatorChar + "msiexec.exe", "/x " + sComLine);
System.Diagnostics.Process.Start(uninstallProcess);
System.Windows.Application.Current.Shutdown();
}
我明白了,谢谢你的回复 –