Doxie Posted September 2, 2004 Share Posted September 2, 2004 Does anyone know how i could script local policy in win2k. I tried myself, but i had to use "Send" key all the time, and that does not look good. I rather use "import" policy or write directly to regedit some how (wich can be hard, since windows crypt stuff from Policy) To give you an idea what i need: WriteLocalPolicy=("newpolicy.inf") Or AddPolicy=(%Load and Unload drivers, "Domain", "UserName") I wish i could do like above, but i know its not possible This is what i have done so far RunAsSet("UserName", "Domain", "Password") RunWait(@ComSpec & " /c " & "c:\winnt\system32\secpol.msc /s","",@SW_HIDE) Thanks in advance Were ever i lay my script is my home... Link to comment Share on other sites More sharing options...
Andre Posted September 2, 2004 Share Posted September 2, 2004 Hi, Perhaps u can explain what u want to do in your "local" policy ? Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
Doxie Posted September 3, 2004 Author Share Posted September 3, 2004 Hi I wanted to give my users the right to load and unload drivers. After some search on the net i found a way. And of course i will share it with you guys RunAsSet("Secret", "Secret", "Secret") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor", "AutoRun", "REG_SZ", "C:") FileCopy("\\xp2app02\win2000\tools\USB\load.inf", "C:\Winnt\*.*") Run(@ComSpec & " /c " & "secedit /configure /db \winnt\security\database\secedit.sdb /cfg load.inf /areas USER_RIGHTS","",@SW_HIDE) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor", "AutoRun", "REG_SZ", "") Sleep(2000) FileDelete("C:\Winnt\load.inf") RunAsSet() Above you can see i'm loading a file call load.inf. That is the file i created on my own computer by "exporting" my own settings from secpol.msc. So i'm loading that file into ever users security database (secedit.sdb) And on the line below, i'm pointing out that it should only add user rights from that file. Were ever i lay my script is my home... 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