Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: MMC Microsoft Management Console Computer Management Utility Event Viewer snapins
I want to be able to format drives via the Computer Management MMC and to manipulate the EventVwr MMC, all under Win2K.
I guess I need to know which Extender(s) I need to use to work with the MMC's in Win2000.
This should get you pretty close with the disk stuff...
AddExtender("wwctl34I.dll") ; Add in Control Manager extender ;Run MMC with computer management utility compmgmt=Strcat(DirWindows(1),"compmgmt.msc") run("mmc.exe",compmgmt) ;Using Control Manager navigate down to disk utility topwnd=DllHwnd("Computer Management") child2=cWndByID(topwnd,59648) child3= cWndByID(child2,65280) child4=cWndByID(child3,59648) syslist=cWndByID(child4,12786) text=cGetLVText(syslist) x=ItemLocate("Storage",text,@tab) cDblClickItem(syslist,x) TimeDelay(1) text=cGetLVText(syslist) x=ItemLocate("Disk Management (Local)",text,@tab) cDblClickItem(syslist,x) TimeDelay(1) ; ok now we have the disk stuff up. Figure out drives available. ;Since window has change so much, lets walk the window tree again topwnd=DllHwnd("Computer Management") child2=cWndByID(topwnd,59648) child3= cWndByID(child2,65280) child4=cWndByID(child3,59648) child5=cWndByID(child4,12789) ;Eeeek Analysis script ran out of steam. ;Downloaded sinfo.exe freeware utility from Spain to continue child6=cWndByClass(child5,"AfxOleControl42u") syslist=CWndByID(child6,102) syshdr=cWndByClass(syslist,"SysHeader32") TimeDelay(5) ; wait for disk scan to complete text=cGetLVText(syslist) text=Strreplace(text," ","") ; strip spaces ;header=cGetHRText(syshdr) x=ItemLocate("(C:)",text,@tab) ; Drive to format goes here ;message(x,text) cDblClickItem(syslist,x) TimeDelay(1) ;>>> Add additonal code here (maybe sendkeysto) to format <<<
Article ID: W14625
Filename: Run MMC with Computer Management Utility.txt
File Created: 2001:03:01:14:31:36
Last Updated: 2001:03:01:14:31:36