Jump to content

Help with scripting Local Policy.


Doxie
 Share

Recommended Posts

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 :ph34r:

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

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 :ph34r:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...