Start / Stop Services -- Access is denied

Discuss RoboTask here
Post Reply
RadioNewark
Posts: 3
Joined: Thu Oct 18, 2012 8:30 pm
Location: United States
Contact:

Start / Stop Services -- Access is denied

Post by RadioNewark »

Hello all -- I need to stop and start a Windows service.  DHCP Service, for example.  When I run the [very simple] RoboTask script, I get an Access is denied error message.
I'm running RoboTask interactively under the Administrator account on Windows 2008 Server.  I tried running the GUI with "Run As Administrator."  Still get the Access is denied error.  How can this task be run?  What am I missing?
Thanks a lot,
/sww/
Danndoor
Posts: 1
Joined: Thu Oct 18, 2012 11:54 pm
Location: United States

Start / Stop Services -- Access is denied

Post by Danndoor »

Try passing the username and password as pert of taskexample :net usrname password stop DHCP


Last edited by Danndoor on Fri Oct 19, 2012 4:04 am, edited 1 time in total.
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Start / Stop Services -- Access is denied

Post by Oleg »

Some operations require rights elevation under Vista/7/2008.
Starting service is one of the such operations.
Operating system decreases user rights by default.

You may solve this so:
- turn OFF UAC (this is NOT recommended)
- run RoboTask "As Administrator". in this case RoboTask obtains FULL rights.
- install RoboTask as system service and use these operations in service. In service mode RoboTask uses rights of SYSTEM account
Last edited by Oleg on Fri Oct 19, 2012 10:23 am, edited 1 time in total.
RadioNewark
Posts: 3
Joined: Thu Oct 18, 2012 8:30 pm
Location: United States
Contact:

Start / Stop Services -- Access is denied

Post by RadioNewark »

Yes, turning off UAC worked fine, but not the answer I was looking for.  Run As Administrator did not work, however.  The original error message Access is Denied continued.
Similarly, installing the RoboTask as a Service under Windows Server 2008 did not allow the task to run either.  The same error message Access is Denied is always logged.
I tried running RoboTask as a Service under the Local System account as well as the Administrator account.  The error was the same under both accounts.
Any other ideas or suggestions?
Thank you,
/sww/
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Start / Stop Services -- Access is denied

Post by Oleg »

turning off UAC worked fine, but not the answer I was looking for. Run As Administrator did not work, however.
This is impossible

When you run RoboTask "As Administrator" the application gets all possible rights.
I.e. application is working in the same mode as without UAC.
Turning UAC off and running RoboTask "As Administrator" are two similar ways to solve problem of insufficient rights.
Post Reply