 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
angie.cortes
Joined: 16 Jun 2015 Posts: 2 Country: Costa Rica |
|
Not enough permissions or invalid service name |
|
Hello,
I'm trying to restart a Windows service using JAL functions ServiceStop() and ServiceStart() in a 24x7 job.
Even though the session is running with an administrative account, I keep getting this error message: "Error stopping service. Not enough permissions or invalid service name."
I tried finding a place to review with which user is 24x7 running, but I couldn't find it.
Could you please help me?
Thank you.
|
|
Tue Jun 16, 2015 12:46 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
If you are running 24x7 Scheduler as a service, that would be the logon account assigned to the 24x7 Scheduler service. If you are running it in console or GUI mode, then that would be the account running the process. In case case you can see which user is running a process in the Task Manager.
Please note for the parameter you need to specify service name as it is registered with the system, not the service display name (or long descriptive name), which appears in the Windows services applet and which is often different. If not sure about the service names, execute the following from the command line
sc queryex type= service state= all
You want to use with ServiceStop/Start functions what is reported in the SERVICE_NAME value.
|
|
Tue Jun 16, 2015 1:09 am |
|
 |
angie.cortes
Joined: 16 Jun 2015 Posts: 2 Country: Costa Rica |
|
|
|
Thank you very much for the clarifications.
After several attempts, I finally could use the functions but I had to add a Wait time in between the ServiceStop and the ServiceStart.
Apparently, the one that was failing was the attempt to start a service which was still in the process of being stopped.
The error message was quite confusing, though.
|
|
Tue Jun 16, 2015 2:30 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|