Page 1 of 1

PowerShell GUI running under WinPE

Posted: Wed Feb 05, 2014 1:00 pm
by PGomersall
Hi all,
I have built a very nice PowerShell GUI in Studio 2012 that acts as a UI for DISM. It works flawlessly in Windows. If I run it in WinPE (which is the primary reason I built it) openfiledialog, savefiledialog and folderbrowserdialog will not work; when I click the buttons to raise them? The underlying form is opened via a ps1 file.
This is 64 bit WinPE v5 with what I believe is all required dependences add to PE.
If anyone can shed any light on this I would appreciate it.
Regards,
Pete

Re: PowerShell GUI running under WinPE

Posted: Wed Feb 05, 2014 2:15 pm
by Alexander Riedel
I don't think the common dialogs are available in WinPE, but you will have to verify that with Microsoft.

Re: PowerShell GUI running under WinPE

Posted: Wed Feb 05, 2014 2:38 pm
by PGomersall
I found the problem with the open and save dialogs:
If a WinForms application running on Windows PE calls “OpenFileDialog.ShowDialog” or “SaveFileDialog.ShowDialog” the call fails unless one sets the property “AutoUpgradeEnabled” to “false” before calling “ShowDialog”.

I just need to find a fix for getting the folderbrowserdialog to show the tree.
Regards,
Pete