- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Using dialogs in a powershell script
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I'm display error messages using dialog bowes.
function error_message([string]$message){
[System.Windows.Forms.MessageBox]::show("$message", 'CTSS Installer','Ok','Error')
return $message
}
error_message "something went very wrong here ..."
The dialog box is displayed, but it's hidden by installshield's progress window.
Is there a way to have my dialog being always displayed on top of the installshield window ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Now this time it worked.
In powershell, I use this function to popu dialogs.
function error_message([string]$message){
trace-info "ERROR_MESSAGE: $message"
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup($message,0,"CTSS Installer - Error",0x1000)
return $message
}
I'm using an undocumented nType 0x1000 (4096) instead of 0x0.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Alternatively, if you want to show a msgbox use script:
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("Show here error description",0,"Error",0x0)
=======================================================
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Yet the message popup is still hidden by the InstallShield window.
Maybe it's the wrong approach. Is there a way to let install shield display the error message. Is there such a property that can be set in a powershell script with set-property ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I've found an another example
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
and scroll down to my answer t my own question.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Now this time it worked.
In powershell, I use this function to popu dialogs.
function error_message([string]$message){
trace-info "ERROR_MESSAGE: $message"
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup($message,0,"CTSS Installer - Error",0x1000)
return $message
}
I'm using an undocumented nType 0x1000 (4096) instead of 0x0.