Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Displaying a dialog box to continue

Hi everyone, 

We want to deploy/upgrade flash. But it requires IE to be closed. We want to give user a chance to press OK when they are ready to close IE and continue the update. We found this thread https://support.pdq.com/hc/en-us/community/posts/211678327-install-step-without-it-being-silent which is similar to what we are trying to do. So we follow along. 

I used Mmuni's script and created a vbs file. It is working ok when I double click on it. I can see the dialog box and be able to press "Yes" or "No"

But when I added that in as one of the install steps in PDQ. It would not display any dialog box and the step fails.  

Tried to change setting in "Run as" to "logged on user" or "deploy user (interactive)". It still would not dialog box.

Are we doing something wrong? 

Thanks in advance. 

0

Comments

2 comments
Date Votes
  • I don't know that the runner service has a method for interacting with VBS files natively. Do you mind posting your step here? A picture of it will do, redacting company information as needed of course.

     

    You could try doing something like this with Powershell:

    $MessageBox = [System.Windows.MessageBox]::Show('IE Needs to close for an update. Please select Yes to close, or No to cancel.','PDQ Update Notification','YesNoCancel','Information')

    Switch ($MessageBox){

    'Yes' { Stop-Process iexplore.exe }

    'No' { Write-Output "User selected No.";Exit 1 }

    'Cancel' { Write-Output "User selected Cancel.";Exit 1}

    }
     
    Exiting with a status of 1 should result in a failed step. You can do what you want with that information in your deployment. But this should give them a message box and Selecting "Yes" will call Stop-Process on iexplore.exe (note Microsoft Edge will be different, plan accordingly).
     
    Hopefully that at least gets you pointed in the right direction. Let us know if you need more help.

     

     

    0
  • Thank you Stephen. 

    Tried to add your Powershell code. However, I cannot get a dialog box displayed on the screen. My biggest problem is not be able to get any dialog box display (either Powershell script or VBS script) when I have script as one of the deployment steps. 

    I know the powershell script or vbs script works when I run that locally. I can see the dialog box. But when I have that as one of the deployment steps. It does not display anything and the deployment just goes on. The "Message" step works. But it does not let you to take different action based on respond from the user. 

    Not sure why the dialog powershell or VBS script does not work. I even tried using "Write-host" or "Write-output" but there is no dialog box. 

    This is the VBS script I have. 

    ---------------------------------------------------------------------------------------

    Set objShell = CreateObject("Wscript.Shell")
    intReturn = objShell.Popup("IE Needs to be closed", 10, "Press Yes to Continue", 4 + 32)

    If intReturn = 6 Then
    Wscript.Quit(6)
    ElseIf intReturn = 7 Then
    Wscript.Quit(7)
    Else
    Wscript.Quit(6)
    End If

    ----------------------------------------------------------------------------------------------

    Thank you very much. 

     

     

    0