远程sc OpenSCManager查询失败5访问被拒绝 [英] remote sc OpenSCManager query failed 5 access denied

查看:933
本文介绍了远程sc OpenSCManager查询失败5访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个脚本,该脚本会定期检查某些服务是否在远程工作站上运行.我有一时间从一台测试机运行到另一台测试机的"SC \ workst1查询"命令.两台机器都运行XP pro SP3.两者都不是域的一部分.两者都在同一个工作组中,并且管理员帐户具有相同的密码.

I'm writing a script that periodically checks that certain services are running on remote workstations. I'm having a devil of a time getting an "SC \workst1 query" command working from one test machine to another. Both machines are running XP pro SP3. Neither is part of a domain. Both are in the same workgroup, and the administrator accounts have the same passwords.

从任何一个工作站到另一个工作站,我始终收到"[SC] OpenSCManager失败5:访问被拒绝"消息.我尝试对两者都使用提升的特权. Windows防火墙软件已关闭.事件安全日志中没有显示任何消息.当(以管理员身份)我尝试转到计算机管理"->连接到另一台计算机"并访问远程服务时,出现错误5访问被拒绝".

I keep getting the "[SC] OpenSCManager FAILED 5: Access is denied" message, from either workstation to the other. I have tried using elevated privileges on both. Windows firewall software is turned off. There are no messages are showing up in the Event security logs. When (as administrator) I try going to "Computer Management" -> "connect to another computer" and access the remote services I get "Error 5 Access is denied".

我可以成功在两台计算机之间建立文件系统共享,并且"net use \ workst1 \ IPC $/user:Administrator"成功完成,但是SC查询仍然失败.我在这些命令中使用的是IP地址而不是主机名,但这无济于事.我不知道还能尝试什么.感谢您的帮助.

I can set up a filesystem share between the two machines successfully, and "net use \workst1\IPC$ /user:Administrator" completes successfully, but the SC query still fails. I'm using IP addresses and not hostnames in these commands, but that doesn't help. I don't know what else to try. Thanks for the help.

推荐答案

尝试以管理员身份运行命令

Try to run the commans as a Administrator

开始->(在搜索框中键入 cmd ),右键单击 cmd 以管理员身份运行->执行命令

start-> (type cmd in search box), right click on cmd, Run as a administrator -> execute your command

这篇关于远程sc OpenSCManager查询失败5访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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