Jump to content
Sign in to follow this  

Trying to Change Group Policy will not send to MMC

Recommended Posts

I created a very simple script to open gpedit.msc

I am trying to send the alt commands to the mmc window to disable local group policies.

When the script runs it will not insert the alt commands to the MMC.

I am a newbie to Autoit but this seems like it should be really easy.

Below is my script. Can someone help me out? I have 200+ (non domain) machines waiting for this.






Share this post

Link to post
Share on other sites

I have tried several different ways to send the Alt keys. i have tried {ALT} {ALT DOWN} AR{ALTUP}. I am at my wits end with this.

In testing i changed to notepad instead of gpedit.msc. the {ALT}fx{TAB}{ENTER} worked to close notepad without saving.

I am curious as to why the mmc window will not see the {ALT} commands?

Here is the latest script






Edited by btitguy1

Share this post

Link to post
Share on other sites

It seems some management windows in Windows7 are protected from Virtual keystrokes... I also tried to do a similar script to check actual path of shares via Computer Management and ran into the same issue you are having... no solution so far.

You could always use "the back door" and get the same results via WMI or object manipulation but that can be done with VBscript or powershell... not sure why AutoIt seems to be going that way

Share this post

Link to post
Share on other sites

Found something!!!!

In order to bypass this Windows7 security where "protected" windows ignore virtual key strokes (assuming that is the real issue)... you need to do 2 things:

1) add #requireadmin at the beginning of your script; this will require you to accept the Windows 7 security warning

2) make sure the script is running locally, I had it on a share and it gave me an error if I ran it from there even with the #requireadmin added

My script is interacting with the Computer Management window now (compmgmt.msc)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...