asif0012
Posts: 45
Joined: Tue Nov 22, 2022 6:30 pm

Finish dialog not appearing after installation

Hi, I am facing a problem using "mongorestore" to import data to MongoDB by Powershell inline script custom action. Data gets imported but "Finish Dialog" and "Reboot Prompt" doesn't appear after the installation is finished.

I have an installer that imports data to MongoDB using "mongorestore" by a PowerShell inline script custom action. The system has MongoDB (5.0.4 2008R2Plus) and MongoDB Tools (100.6.1) already installed beforehand. But after running the PS custom action, data gets imported to MongoDB but "Finish Dialog" doesn't appear at the end of the installation. I also use the property "Force Reboot After Install", The reboot prompt after finishing installation also doesn't appear after running this custom action.

Code: Select all

Param($baseDirectory)

$appDataDirectory = $baseDirectory.SubString(0, $baseDirectory.Length-1)

$coreDataPath = "$appDataDirectory\SeedData\mongodb\Data\2c88465c-f791-4b36-9dda-e2af38f11258"
$sampleDataPath = "$appDataDirectory\SeedData\mongodb\Data\SampleDatabase02"

$executablePath = "C:\Program Files\MongoDB\Tools\100\bin\mongorestore.exe"

$coreDataProcess = Start-Process -FilePath "$executablePath" -ArgumentList "--db=`"2c88465c-f791-4b36-9dda-e2af38f11258`"","`"$coreDataPath`"" -PassThru -Wait

$sampleDataProcess = Start-Process -FilePath "$executablePath" -ArgumentList "--db=`"SampleDatabase02`"","`"$sampleDataPath`"" -PassThru -Wait

PS inline script custom action configuration
PS inline script custom action configuration
PS inline script properties.png (65.28 KiB) Viewed 6400 times
Install parameters configuration.png
Install parameters configuration.png (47.32 KiB) Viewed 6400 times
Catalin
Posts: 6661
Joined: Wed Jun 13, 2018 7:49 am

Re: Finish dialog not appearing after installation

Hello,

Most likely, this has nothing to do with your PowerShell script, but rather something else.

For instance, in the "Dialogs" page, under "First time install", do you have the "ExitDlg"?

If the dialog is there, then make sure the "Run finish actions without displaying this dialog" option is NOT checked.
Screenshot_34.png
Screenshot_34.png (191.66 KiB) Viewed 5576 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
asif0012
Posts: 45
Joined: Tue Nov 22, 2022 6:30 pm

Re: Finish dialog not appearing after installation

Hi Catalin,
I reinvestigated the issue. It is indeed not related to the Powershell script but also not related to ExitDialog checkbox. I think it is related to "Force Reboot After Install" property selected in the Installer Parameters section. After selecting this parameter, FinishDialog and Reboot Prompt both disappears. I want to force show a "Reboot Prompt" after exiting the Finish Dialog. How can I achieve this behavior?

I have attached a sample AIP file that replicates the Finish Dialog disappear behavior.
FinishDialogDisappear.aip
(22.9 KiB) Downloaded 161 times
Catalin
Posts: 6661
Joined: Wed Jun 13, 2018 7:49 am

Re: Finish dialog not appearing after installation

Hello,

Thank you for the provided AIP file.

I was indeed able to replicate this with your project.

After further tests, I noticed this is due to the "Fast installation - optimized file costing and copy, indeterminate process" option from the "Install Paramaeters" page.

Could you please remove that option and let me know if everything is working as expected?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”