Search code examples
commandwindows-installer

Silently Install MSI - getting stuck


Hoping someone can help me? I am trying to silently install an MSI using msiexec.exe /i "SomePDFPrinter.msi" /qn and it is not working. When I try to manually install the MSI it stops at the step in the screen shot below and if you hit Test, then you can hit Next to finish the installation. I tried to install it with ACCEPT=1 and ACCEPTEULA=1 and no luck.

MSI Dialog


Solution

  • Short: That is a custom dialog. Disable it and set the properties associated with those dialog fields directly in the property table (using a transform) so that data is written by whatever mechanism they normally are written.

    Setting the properties is usually enough. Sometimes you need to use a custom action. To find the property names inspect the dialog fields with Orca or a suitable MSI viewer (list of tools there). Then set the properties in the Property table.


    Custom Dialog: This is a custom dialog (not from a standard and hence tested dialog set) and might be authored incorrectly - it might even be out of sequence if it is a spawned Win32 dialog (doesn't look like it is). I have seen a lot of weirdness in cases like these since the proper way to do things is often unclear to people.

    Modifying Installer: There are two main ways to modify an MSI installation files: Properties and transforms - see here. The way I would solve things in this case would be to apply a transform to remove the whole dialog from displaying and then check that the data gathered makes it into where it is supposed to go. That can be in the registry, on disk or even a file or a database. This varies. Transforms are little database modifiers. Here is an inlined example of how to apply transforms at runtime:

    msiexec.exe /I "My.msi" /QN /L*V "C:\My.log" TRANSFORMS="C:\My.mst"
    

    IT Ninja, Software Library: There is a library / database of packages deployment information here: https://www.itninja.com/software-library/software - if you find your setup there you might get a head start or a solution to deploy properly.

    Further information: Some useful links: