user63898
user63898

Reputation: 30915

Apache Commons Daemon procrun Access is denied on windows 7

i try to run the example for windows that comes with :

commons-daemon-1.0.10-src\src\samples\ProcrunService.java

i complied it fine , but when i run the ProcrunServiceInstall.cmd im geting

Access is denied

i running also as command like like this :

prunsrv //IS//ProcrunServiceJvm --DisplayName="ProcrunServiceJvm" --Startup=auto --Install=d:\dev\java\libs\commons-daemon-1.0.10-src\commons-daemon-1.0.10-src\dist\prunsrv.exe --StartMode=java --StopMode=java --Classpath=d:\dev\java\libs\commons-daemon-1.0.10-src\commons-daemon-1.0.10-src\dist\ProcrunService.jar --StartClass=org.eclipse.jetty.start.Main  --StopClass=org.eclipse.jetty.start.Main --StartMode=java --StartClass=ProcrunService --StartParams=start --StopMode=java  --StopClass=ProcrunService  --StopParams=stop

and error im getting :

[2012-11-10 12:03:29] [error] Unable to open the Service Manager
[2012-11-10 12:03:29] [error] Access is denied.
[2012-11-10 12:03:29] [error] Commons Daemon procrun failed with exit value: 8 (Failed to install service)
[2012-11-10 12:03:29] [error] Access is denied.
Access is denied.
Failed to install service

what is the problem here ? its my home pc where i have all the rights and control on the files

Upvotes: 1

Views: 8690

Answers (1)

CoreTech
CoreTech

Reputation: 2433

Try running your command from a prompt with admin rights. Right-click on the CMD.exe icon and select "Run as administrator" to start it that way.

Upvotes: 2

Related Questions