GTFK Posted January 21, 2009 Share Posted January 21, 2009 I have 40 laptops that are not part of a domain and I need an easy way to change the gpedit.msc settings to lock down the desktop and screen savers on each laptop. I haven't seen any short cuts for these settings. All of them are set through mouse clicks or system of tabs, arrow keys and enters. The problem is every time and way I've done it, the script always freezes when navigating the Administrative Templates folder. I'm really new to scripting so any advanced help would be appreciated. Link to comment Share on other sites More sharing options...
dantay9 Posted January 22, 2009 Share Posted January 22, 2009 Try looking into MouseClick() and ControlClick() in the help file. I'm not experienced, but I think this should do the trick. Link to comment Share on other sites More sharing options...
bo8ster Posted January 22, 2009 Share Posted January 22, 2009 Couple of suggestions Run("gpedit.msc") to open the window Then you can use MouseMove(x, y) and MouseClick("left") for the nav. Use the Info Window to get the mouse coords. You can also use control handles as suggested by dantay9 but there is not much to grab there. Lastly post up what you have Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
bo8ster Posted January 22, 2009 Share Posted January 22, 2009 Maybe something like this ShellExecute("gpedit.msc") WinWaitActive("Group Policy") Global $appHandle = WinGetHandle("Group Policy") MouseMove(117, 297) MouseClick("left") ; and so on WinClose($appHandle) Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Lattis2003 Posted January 22, 2009 Share Posted January 22, 2009 In a nutshell. The changes made with gpedit are saved to registry.pol files in System32\GroupPolicy\User and \Machine folders. Make the changes you want on a test laptop and copy over the registry.pol files to the laptops to be locked down. Deny permissions for the Administrators group to the \User and \Machine folders so the policies don't apply to admins logging in. Run gpupdate /force to apply the policies to the computers. Hope this helps. Link to comment Share on other sites More sharing options...
weaponx Posted January 22, 2009 Share Posted January 22, 2009 Gpedit.msc is basically just a frontend for a bunch of registry settings. If you run RegShot before you make a change you can easily find the registry locations. Link to comment Share on other sites More sharing options...
GTFK Posted January 22, 2009 Author Share Posted January 22, 2009 I'm going to try all you suggestions today. Thanks for the help. Link to comment Share on other sites More sharing options...
AzKay Posted January 22, 2009 Share Posted January 22, 2009 Gpedit.msc is basically just a frontend for a bunch of registry settings. If you run RegShot before you make a change you can easily find the registry locations.or Regmon # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
AutoITMissouri Posted June 5, 2010 Share Posted June 5, 2010 Maybe something like this ShellExecute("gpedit.msc") WinWaitActive("Group Policy") Global $appHandle = WinGetHandle("Group Policy") MouseMove(117, 297) MouseClick("left") ; and so on WinClose($appHandle) Can you please tell me how to get MouseMove(x,y), x and y coordinates? Thanks Link to comment Share on other sites More sharing options...
DW1 Posted June 5, 2010 Share Posted June 5, 2010 Can you please tell me how to get MouseMove(x,y), x and y coordinates?ThanksHoly year and a half old thread, Batman!Instead of using the coordinate route, I suggest you edit the registry directly. Use ProcMon to determine the proper key. ProcMon now includes all the functionality of both FileMon and RegMon. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Juvigy Posted June 7, 2010 Share Posted June 7, 2010 This is all not good practice. If you have 40 PC's (or more) just put them in a AD group and do a policy on that group. It is all easier then doing it locally on all PC's.That way if you need to change you will have to do a 1 min policy change on the AD and it will be updated on all pcs. Link to comment Share on other sites More sharing options...
bo8ster Posted June 8, 2010 Share Posted June 8, 2010 Can you please tell me how to get MouseMove(x,y), x and y coordinates?ThanksYou can get them from the mouse section in the autoit info tool. See also MouseGetPos() and MouseCoordMode (Option) in the help file. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] 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