Link to home
Start Free TrialLog in
Avatar of Tougas
Tougas

asked on

Setting Security Policy => Log on as a service

Hello all,
     I've created a service application with "srvany.exe" and i've set this service to Log On as a specific user, because it needed more then the Local System account. All of this process was done in a .bat file.

But after that, when i'm trying to start the service, it gives an error : "Error 1069 - The service did not start due to a logon failure".

This problem is caused because the user associated to the service is not part of the security policy "Log on as a service". Manually, i now how to add this user to solve the problem...
- but how can i add this user to this policy within a .bat file ??
- is there any application or utility that could do the job ??
- any programming type so that to the extreme i build my own .exe to do it ??

thanks in advance,
js
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of st_steve
st_steve

You can use the "Net Add" command in your batch file to add users to specific groups.
Avatar of Tougas

ASKER

Thanks a lot !
"http://www.bhs.com/" got me the perfect utility for it!!

I didn't know these Windows Utilities sites! I'm more of a programmer.... so i only know a lot of programming ones!

it really helped !

have a good week!
js
Glad I could help !