SAM2009
asked on
Add a prompt msg in PowerShell
In this PowerShell code:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
$FileBrowser = New-Object System.Windows.Forms.OpenF ileDialog -Property @{
InitialDirectory = [Environment]::GetFolderPa th('Deskto p')
Filter = 'Documents (*.docx)|*.docx|SpreadShee t (*.xlsx)|*.xlsx'
}
$null = $FileBrowser.ShowDialog()
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
How can I add a msg like: "Please choose your userinfo file:"
--------------------------
$FileBrowser = New-Object System.Windows.Forms.OpenF
InitialDirectory = [Environment]::GetFolderPa
Filter = 'Documents (*.docx)|*.docx|SpreadShee
}
$null = $FileBrowser.ShowDialog()
--------------------------
How can I add a msg like: "Please choose your userinfo file:"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the result of the showdialog is either ok or cancel the null removes the ok/cancel message
ASKER
Thanks guys!
ASKER
$null = $FileBrowser.ShowDialog()
Why put it in $null?