【发布时间】:2017-04-07 09:59:39
【问题描述】:
我正在使用一个安装项目,我已经创建了一个安装程序类:
using System;
using System.ComponentModel;
using System.Runtime.Remoting.Contexts;
namespace Client.Common
{
[RunInstaller(true)]
public class Installer : System.Configuration.Install.Installer
{
public Installer()
{
}
public override void Commit(System.Collections.IDictionary savedState)
{
try
{
base.Commit(savedState);
System.Diagnostics.Process.Start(Context.Parameters["TARGETDIR"] + "Client.UI.exe");
base.Dispose();
}
catch (Exception ex)
{
}
}
}
}
我将我的提交自定义操作的 CustomActionData 设置为:
/TARGETDIR="[TARGETDIR]\"
当我运行 MSI 为“Just Me”安装时,它运行良好,它会打开 exe,但当我为“Everyone”安装时,它不会运行 exe。
我是否遗漏了一些东西以使“每个人”也能发生这种情况?
【问题讨论】:
-
您是该系统的管理员用户吗?当您为安装在全球位置的每个人安装应用程序时。
-
@SushilMate 是的,我是管理员
-
我想这可能会对你有所帮助。 stackoverflow.com/a/11490003/2745294
标签: c# setup-project