jefhal Posted September 28, 2005 Posted September 28, 2005 (edited) I was bored so I converted the command line program compmgmt.msc into one that can take a machine name as a parameter. Compile this as, e.g. +compmgmt.exe and then use it as: +compmgmt sysnameIt will open the management console and then switch to the machine you want to view. I'm going through all the *.msc files to do the same (where applicable.)if $CmdLine[0] = "" Then $SysName = InputBox("Enter System Name", "Please enter system name","localhost") Else $SysName = $CmdLine[1] EndIf Run("mmc c:\windows\system32\compmgmt.msc /computer:\\" & $SysName) ExitUpdated per MikeqfHere's the event viewer converted to accept command line input of the remote system name. By the way, these work great as task shell commands in a custom Active Directory console. You just use the system "Name" as the parameter and you are "good to go".if $CmdLine[0] = "" Then $Sysname = InputBox("Enter System Name", "Please enter system name","localhost") Else $SysName = $CmdLine[1] EndIf run(@comspec & ' /c ' & "eventvwr.msc",@tempdir,@SW_HIDE) winwait("Event Viewer") send("!ac") winwait("Select Computer") send($SysName) send("{enter}") Exit Edited September 29, 2005 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
drak Posted September 28, 2005 Posted September 28, 2005 nice, now all you need is to put them all together with an option on which one you want to run
mikeqf Posted September 29, 2005 Posted September 29, 2005 FYI, a quicker way to run compmgmt.msc on a remote computer: Func _CompMgmt() $PCName = InputBox("PC Name","Enter the PC Name") Run("mmc c:\windows\system32\compmgmt.msc /computer:\\" & $PCName) EndFunc
jefhal Posted September 29, 2005 Author Posted September 29, 2005 nice, now all you need is to put them all together with an option on which one you want to run Of course! Even when I run these from my Active Directory task bar, once I have the machine name, a popup gui would be useful...FYI, a quicker way to run compmgmt.msc on a remote computer:Thanks! Do you think I could find that yesterday on Google? No. I knew there were switches, but could NOT find them. By the way the code at the top of my script is so I can run the same script from command line or from the Active Directory task bar. I point to a machine and launch whatever tool I need on that target machine: Dameware, Compmgmt, c$, CreateNameScript, Find1394, LastUser, EventManager... The lazy man's path to more time on the AutoIT forum! ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
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