Hi, I'm using PowerShell Studio version 3.0.4. When I try using OpenFileDialog, it works perfectly when I run the script using "Run Project" through PowerShell Studio. However, when I Package the project as an EXE file and run it, I get (Not Responding) error.
Is there any known issues when using OpenFileDialog in a Packaged Project ??
Here is the code I am using:
$restoreToolStripMenuItem_Click={
If (-not $connected) {
Call-ConnectedError_pff
} else {
$openfiledialog1.InitialDirectory = "$homeCisco-SP-Exported-xml"
$openfiledialog1.ShowDialog()
$fileToRestore = $openfiledialog1.FileName
$spXML = New-Object XML
$spXML.Load($fileToRestore)
$spName = $spXML.configConfMo.inConfig.lsServer.name
$spLocation = $spXML.configConfMo.Dn
$SP = Get-UcsServiceProfile -name $spName
if ($SP) {
Call-SpExistsError_pff
} else {
Call-Restore_pff
}
}
}
As soon as I click on the "Restore" menu item, the application shows (Not Responding) ... but doing the same using "Run Project" works fine.
Thanks
OpenFileDialog causes Not Responding
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
OpenFileDialog causes Not Responding
Try checking the Run in STA Mode option for the packager. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.