Invoking an MMC Snap-in function from Windows command shell: is it possible?

I need to execute a MMC Snap-in function from the Command Shell of a Windows computer. I need it to schedule this command in the same Windows PC and executes in background.

Probably this questions could seem a little bit strange but I have a program that creates a debug log only through its MMC Snap-in console. And I need to automatise this task to programatically read this log!

Dows anyone know how to do this?

thanks

-

Try to use AutoIT:

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying “runtimes” required!

-

You can access the MMC 2.0 Automation Library via COM from Powershell. Possibly nasty, but workable.

To get started with Powershell:

$mmc = New-Object -ComObject MMC20.Application$mmc.Load("path\to\some.msc")

1. You'll probably have to be admin.
2. The API is pretty awful but you should be able to access the data through it. Here's a VB example of extracting stuff from the a snap-in's items.
-