我在Windows 8.1中启动glassfishs服务时遇到问题
我收到了这个错误:
c:\glassfishv3\bin>asadmin create-service
Found the Windows Service and successfully uninstalled it.
WMI.WmiException: AccessDenied
at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[]
args)
at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , Err
orControl , StartMode , Boolean , String[] )
at winsw.WrapperService.Run(String[] args)
at winsw.WrapperService.Main(String[] args)
Error while trying to install GlassFish as a Windows Service.
The return value was: 2.
STDERR:
STDOUT: WMI.WmiException: AccessDenied
at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result)
at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[]
args)
at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , Err
orControl , StartMode , Boolean , String[] )
at winsw.WrapperService.Run(String[] args)
at winsw.WrapperService.Main(String[] args)
Usage: asadmin [asadmin-utility-options] create-service [--name <name>]
[--serviceproperties <serviceproperties>]
[--dry-run[=<dry-run(default:false)>]] [--domaindir <domaindir>]
[-?|--help[=<help(default:false)>]] [domain_name]
Command create-service failed.
用户帐户是管理员。
我不知道该怎么做,你能否给我一个推荐来解决这个错误。
答案 0 :(得分:2)
您的帐户可能是管理员但是您启动了cmd / shell&#34;作为管理员&#34;?好旧的Windows UAC。
我遇到了这个问题,必须右键单击cmd.exe /命令提示符并选择&#34;以管理员身份运行&#34;
然后运行:asadmin create-service --name&#34; Glassfish YourDomainName&#34; YourDomainName