Hi Everyone,
The installer that we created has a SQL Server 2016 SP2 Express as a prerequisite and is currently running into a problem in some machines due to a pending restart requirement. In order to mitigate the issue, we created a PowerShell Inline Script (CheckPendingReboot) that checks for values in the registry for any pending restarts and sets an AI property (REBOOT_FLAG_PROP) to true, otherwise false if no restart needed. If true, a dialog window will check the value of this property and a window will block the user from continuing with the installation until the machine has restarted. Please refer to the attached powershell script for reference
It has worked for most machines, however, we are puzzled as to why the custom action would not be triggered to some. I crosschecked the log files of two machines that both have pending restarts (machine A where the installer blocked the user and machine B that didn't); I noticed that the log file in machine B a line that the property has been set. These machines are running in Windows 10 OS. See below line missing from machine B
MSI (c) (34!8C) [18:04:40:333]: PROPERTY CHANGE: Modifying REBOOT_FLAG_PROP property. Its current value is '0'. Its new value: '1'.
Attached log files of the machines:
Because of the property not being set correctly, the installation throws an error when it tries to install SQL Server due to the pending restart. Below is the log message by the SQL installer
One or more affected files have operations pending.
You should restart your computer to complete this process.
Error message thrown by the installer
So the real question would be: Are there any particular scenarios that the custom actions would not work or particular configurations that we might have missed? Do let me know if the info given above is lacks some details.
Regards,
Allan
FOLLOW US
Get the latest news in Application Packaging