1

When using the MMC (Microsoft Management Console) 3.0 I cannot get AsyncStatus message shown in console window.

I assume it is supposed to be displayed in the status bar of the MMC.

When using the StandardVerb (like OnRefresh or OnExpand) at least it is working with its default message (like Expand: In progress...)

However, when I try to use status.ReportProgress([...]) or status.Complete([...]) it does not work.

Example:

class MyMMCListview : MmcListView {
    [...]
    protected override void OnAction(Microsoft.ManagementConsole.Action action, AsyncStatus status)
    {
        status.ReportProgress(1, 2, "Loading 1");
        System.Threading.Thread.Sleep(3000);
        status.ReportProgress(2, 2, "Loading 2");
        System.Threading.Thread.Sleep(3000);
        // default behavior
        base.OnAction(action, status)

        // Nothing done successfully
        status.Complete("Done", true);
    }
    [...]
}

MmcListView: https://msdn.microsoft.com/en-us/library/microsoft.managementconsole.mmclistview_members(v=vs.90).aspx

AsyncStatus: https://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.managementconsole.asyncstatus(v=vs.85).aspx

Any suggestions?

Ole K
  • 754
  • 1
  • 9
  • 32
  • Did you ever solve this? i have the same problem :( – zaitsman Mar 02 '16 at 12:44
  • @zaitsman I did not actually. I solved it that way to display status messages through the nodes or listview – Ole K Mar 02 '16 at 13:20
  • have you got an example maybe, especially with listview? Did you mean you write a custom winforms control that hosts listview or..? And with nodes -> I guess I still want the mmclistview control, just handover the status to scopenode somehow to update the status bar... – zaitsman Mar 02 '16 at 20:28

1 Answers1

0

I've tested this several times and it seems that ReportProgress and Complete are showing a message in the status bar only when they where called from an override in a ScopeNode.

Udo
  • 449
  • 3
  • 13