2

I'm using a Scheduled Task under Windows 8 to trigger a simple .cmd file which contains a series of steps, some of which trigger an external Powershell script.

I want to use the MessageDialog() features of Windows 8 to display a model message.

Is it possible to do this via Powershell? Or another simple script?

Peter Bridger
  • 9,123
  • 14
  • 57
  • 89

2 Answers2

1

It is technically possible to call WinRT APIs from desktop targeted applications (of which powershell is one.)

Take a look here: http://www.hanselman.com/blog/HowToCallWinRTAPIsInWindows8FromCDesktopApplicationsWinRTDiagram.aspx

There's still some legwork to do on your behalf, but that should help you figure out the approach.

x0n
  • 51,312
  • 7
  • 89
  • 111
0

I don't think it would be that trivial, the dialog is supported on Windows Store apps only. That said you can use Windows forms to display messages, have you tried it?

Shay Levy
  • 121,444
  • 32
  • 184
  • 206
  • I've noticed that classic SHUTDOWN.EXE Windows application triggers a message using the MessageDialog() modal style, which made me think it's possible outside of a Windows Store app. – Peter Bridger Jul 03 '13 at 14:52
  • Do display a MessageDialog() style message, like this: http://blogs.microsoft.co.il/blogs/shair/image_thumb_2F8B115C.png from the command line/PowerShell – Peter Bridger Jul 04 '13 at 09:53
  • I don't think you can since it is supported only for metro style apps. – Shay Levy Jul 04 '13 at 11:15