emendelson Posted May 10, 2006 Share Posted May 10, 2006 Is there a way to use AutoIt to assign a user the right to Log On As A Service? I know how to do that from the Local Users Policy manager, and there are command-line tools that do the job, but is there a way to do the job via AutoIt? Many thanks for any help. Link to comment Share on other sites More sharing options...
herewasplato Posted May 11, 2006 Share Posted May 11, 2006 Do some of you WMI wizards know how to do this? (free bump) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
emendelson Posted May 11, 2006 Author Share Posted May 11, 2006 Do some of you WMI wizards know how to do this? (free bump) (Thanks for the bump!) The only workaround I've figured out so far is to FileInclude Microsoft's ntrights.exe from the Windows resource kit and run it from a command shell like this $u = @ComputerName & "\" & @UserName $nte = 0 $nte = FileExists(@TempDir & "\ntrights.exe") If $nte = 0 Then FileInstall("c:\pathto\ResourceKit\ntrights.exe", @TempDir & "\ntrights.exe", 1) RunWait(@ComSpec & " /c " & @TempDir & '\ntrights.exe -u ' & $u & ' +r SeServiceLogonRight', "", @SW_HIDE) If $nte = 0 Then FileDelete(@TempDir & "\ntrights.exe") This works, but I tend to doubt it's legal to distribute ntrights.exe If there's an all-AutoIt way to do this, I'd be very glad to hear about it! Link to comment Share on other sites More sharing options...
groucho Posted July 25, 2006 Share Posted July 25, 2006 http://www.franzo.co.nz/hansson/grant.htme.g. grant add SeServiceLogonRight myDomain\ServiceAccountworks fine, is free and the firm closed down Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now