8
我正在尝试创建一个基于this walkthrough的简单Windows服务。当我尝试执行命令时:无法安装简单的Windows服务 - 登录?
C:\worl\Project Alpha\Code\AlphaBackendService\AlphaBackendService\bin\Debug>ins
tallutil.exe AlphaBackendService.exe
它提供了一个带有用户名,密码,确认密码的对话框。我输入的东西没有工作,安装失败。它需要什么账号?为什么我不能使用我输入的任何内容?非法入境,是因为在事件日志要求的权限:
public partial class AlphaBackendService : ServiceBase
{
public AlphaBackendService()
{
InitializeComponent();
if (!System.Diagnostics.EventLog.SourceExists("AlphaSource"))
{
System.Diagnostics.EventLog.CreateEventSource("AlphaSource", "AlphaLog");
}
eventLog1.Source = "AlphaSource";
eventLog1.Log = "AlphaLog";
}
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("In OnStart");
}
protected override void OnStop()
{
eventLog1.WriteEntry("In OnStop");
}
}
你是机器上的管理员吗?你可以跑高吗?如果没有,那就是你的问题 – Jason
我是我的机器上的管理员,我在高架设备命令控制台中运行命令 – user2471435
你是积极的吗?你能提供对话框的屏幕截图吗? – Jason