Sign in to follow this  
Followers 0
Guest snowch

how to script gpedit.msc (local group policy)

6 posts in this topic

I have a few hundred w2k desktops on a samba (nt) domain. The desktops need to be restricted with local group policies that are implemented using gpedit.msc.

Unfortunately, there doesn't seem to be a way of exporting and importing the policies. I would like to try to script the changes with autoit. However, it appears that gpedit.msc has been designed for use with the mouse only as there are no menu's of shortcut keys.

Is my only option to script the sending of TABS to move around with gpedit.msc, followed by sending mouse clicks?

Has anyone tried on this list tried to automate setting up group policies in this way?

Thanks in advance,

Chris

Share this post


Link to post
Share on other sites



secedit doesn't appear to let me roll out changes to "User Configuration" such as I.E. settings.

Share this post


Link to post
Share on other sites

Yes, made something like that.

To avoid some problems after a M$-Patch it is neceassary to use gpedit to

set the setting what to invoke or not invoke.

The solution is to simply use the cursor keys to navigate through the menu.

Use TAB to switch into the right Panel and use ENTER to change a value.

Short example, only making something useful in the german version of win2k, I'm afraid...

Run(@ComSpec & " /c gpedit.msc", "", @SW_HIDE)
WinWait ("Gruppenrichtlinie")
WinActivate ("Gruppenrichtlinie")
WinWaitActive ("Gruppenrichtlinie")

; local security settings
Send ("w")
sleep (250)
send ("{RIGHT}")
sleep (250)
send ("si")
sleep (250)
send ("{RIGHT}")
sleep (250)
send ("l")
sleep (250)
send ("{RIGHT}")
sleep (250)
send ("s")
sleep (250)

; Enter settings window 
send ("{TAB}")
sleep (250)
send ("v")
sleep (250)

; select setting and change it
Send ("{ENTER}")
sleep (250)
send ("w")
sleep (250)
Send ("{ENTER}")

Winclose ("Gruppenrichtlinie")

It's my job to comfort the disturbed and to disturb the comfortable.

Share this post


Link to post
Share on other sites

Hi Guyz, I got a school work, where we were asked to create a script to disable and enable control panel and internet option access in both windows xp and vista. And am new to all this script stuff, pls can someone help me the due date is really close.

Share this post


Link to post
Share on other sites

Hi there.

You are an idiot. This is a 5 YEAR OLD THREAD. You should be banned for not being able to read the dates.

Control panel and many other things can be disable, but because you're some script kiddy using the age old it's for school excuse, I'm not going to tell you how. And yes I get a kick out of abusing the young'uns.

My ass this is homework.

1 person likes this

Share this post


Link to post
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
Sign in to follow this  
Followers 0