Sign in to follow this  
Followers 0
houghl

MMC Creation

1 post in this topic

Hi its hot and im lost as usual

Im trying to create a script which creates me an mmc for support staff i wnat it to do the following

Create an MMC which contains the usual dhcp, dns, wins, ad sections it then needs to create a folder called servers and repeat a loop andding the computer management snap for each server so far i have this just to give you an idea but i now need it to either work from a list or scan the domain for servers and then add them as above

;
; AutoIt Version: 3.0
; Language:    English
; Platform:    XP
; Author:        Lee Hough
;
; Script Function:
;   Creates LPH MMC console.
;

AutoItSetOption ("SendKeyDelay", 10)

; Run MMC
Run("mmc.exe")

; Wait for the MMC console to become active
WinWaitActive("Console1")

; Now that the MMC window is active add a folder snap-in
Send("^m")
WinWaitActive("Add/Remove Snap-in")
Send("!d")

WinWaitActive("Add Standalone Snap-in")
Send("folder")
Send("!a")
Send("!c")
WinWaitActive("Add/Remove Snap-in")
ControlClick("Add/Remove Snap-in", "Cancel", "Button5")
WinWaitActive("Console1")
Send("folder")
Sleep(500)
Send("!a")
Send("m")
Send("Servers")
Send("{ENTER}")

; Now that the MMC window is active add a folder snap-in
Send("^m")
WinWaitActive("Add/Remove Snap-in")
Send("!d")
WinWaitActive("Add Standalone Snap-in")
Send("Computer Management")
Send("!a")
WinWaitActive("Computer Management")
Send("!a")
Send("{TAB}")

Any help would be great sorry my brain is fried this morning

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