Home > Powershell > Powershell: OpenFileDialog x64 systems

Powershell: OpenFileDialog x64 systems

Recently I had an issue where the Openfiledialog was not working anymore in one of my Powershell scripts. Nothing happened when I executed my script. The strange thing was that the script was working on an 32-bit system and also with PowerGUI on x64 systems.

The solution is to add the ShowHelp parameter of the OpenFileDialog form and configure it as true:

OpenFileDialog.ShowHelp = $true

The ShowHelp parameter is a new feature within Windows 2008 or above which you must define in Powershell if you want to use the Openfiledialog.

Advertisements
Categories: Powershell
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: