Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Open File dialog and executing in batch file

$
0
0

Hello,

I am opening file dialog using the below reference link http://blogs.technet.com/b/heyscriptingguy/archive/2009/09/01/hey-scripting-guy-september-1.aspx

When i try to run this from PS command prompt no dialog is getting displayed. I don't know since i included the $OpenFileDialog.ShowHelp = $true as mentioned.

I tried with the below content with the batch file but i did not helped me

@ECHO OFF

PowerShell.exe -file "Physical path to the directory\filename.ps1" -initialDirectory 'C:\fso'

PAUSE

can you please provide example how to create a batch file to execute this script with parameter?


Viewing all articles
Browse latest Browse all 6937

Trending Articles