我使用 VS 2010(32 位)开发了一个 Windows 服务,但将其编译为“任何 CPU”。
我已将所需的 exe 和其他文件传输到 Windows 2012 Server(标准版 - 64 位),现在尝试使用 InstallUtil 安装它
我已将命令提示符上的路径更改为“C:\Windows\Microsoft.NET\Framework64\v4.0.30319”,然后运行命令
InstallUtil "D:\MyPath\MyService.exe"
但是安装失败并出现错误
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found,
but some or all event logs could not be searched.
Inaccessible logs: Security.
我试过InstallUtil
以管理员身份运行。服务器没有 Visual Studio 命令提示符。
我该如何解决这个问题?