tags:

views:

302

answers:

1

Problem

I am trying to install hudson build server on a windows server through remote desktop connection. I path to the Hudson folder in the C:\Hudson. The Hudson directory contains a folder called Home and the hudson.war file.

I tried to start it up using the following commands:

set JAVA_HOME=C:\Java\jdk1.6.0_20
set HUDSON_HOME=C:\Hudson\Home
java -jar C:\Hudson\hudson.war

Then I can navigate to http://localhost:8080 in internet explorer.

Question

When I try to use the Install as Windows Service function on the web interface, I get this error:

Installing a service
[Home] $ C:\Hudson\Home\hudson.exe install
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 ,     ErrorControl , StartMode , Boolean , String[] )
   at winsw.WrapperService.Run(String[] args)
   at winsw.WrapperService.Main(String[] args)`

Why can't I install as a windows service and how can I fix this issue?

A: 

Answer

Found the solution.

When running the commands you need to open the command prompt by right clicking and selecting "run as administrator".

MikeU

related questions