Jaa


This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic

In this scenario you may receive an error "This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic" during install/uninstall of a Windows Installer package.

First we need to get a list of each product that Windows Installer thinks is installed on the system. You can use the following steps:

Download msiinv.zip from the following location:

https://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog%7C_Tools/msiinv.zip

Extract the contents of msiinv.zip to the folder c:\msiinv on your system

Click on the Start menu, choose Run, type cmd and click OK

Type this command: c:\msiinv\msiinv.exe -p > c:\msiinv\msiinv_output.txt

Note: This command must be run from a cmd prompt or it will not create a log file as expected.

Please look for the name of the product in the file msiinv_output.txt. For example:

My_Product
Product code: {A067A661-3C40-49EF-91BE-21463149EA0P}
        Product state: (1) The product is advertised, but not installed.
Package code: {A47756B7-E299-49F5-B968-76C880C5D79B}
AssignmentType: 1
Language: 1033
Package: My_Product.msi

        1 feature.
0 features are not used.
1 feature are advertised.
0 features are absent.
0 features installed to run local.
0 features installed to run from source.
0 features installed for default.
0 features in some other state.
0 components.
0 qualified.
0 permanent.
0 shared.
0 patch packages.

 

I found that the Product state value was one (1) which indicates that the product was advertised, but not installed. The MSI package generated by a programmer may have a custom action to show the product as advertised, this will prevent execution of the installation in full UI mode. This problem is typically experienced in Group Policy (GP) related software deployment. If the product is already advertised, you can invoke the install in basic UI or silently. You can run the Installer package via msiexec.exe while specifying the /qb switch to run in Basic UI mode.

NOTE: In the case of an EXE utility extracting the MSI from the EXE by opening it in Winzip may be necessary first.

Running an installer with the basic user interface mode performs only the actions contained in the installer's Execute sequence and bypasses the error noted above in most cases.

MORE INFORMATION:
==================
Windows Installer internal UI handler can selectively show or hide dialog boxes to control the level of end-user interactivity during the installation. These levels of end-user interactivity are referred to as full, reduced, basic, and none. There are two methods to set the UI level. The UI level can be set programmatically with a call to MsiSetInternalUI <msisetinternalui.asp>, and the first parameter of MsiSetInternalUI specifies the UI level. Package developers can also set the UI level using the command line option "/q".

The behavior of each of the UI levels is determined by the authoring of the .msi file by the package developer. The author of an internal UI has flexibility in how these levels behave for a package. The availability of these levels depends on the authoring of the installation package. The author must specify every dialog box and control in the user interface in the Dialog and Control tables.

A full UI typically exhibits user interface wizard behavior, such as each dialog box in a sequence containing a Next>> button. This form of UI is familiar to many users and is the most common type of UI for an author to create. The installer presents a logical sequence of dialog boxes and prompts the user to interact with controls located in each dialog box.

A reduced UI typically suppresses the display of wizard behavior.

A basic UI typically only displays progress messages to the user.

A UI level of none means a silent installation.

As an alternative to using msiexec.exe, you can launch an MSI package from VBScript code using the InstallProduct method of the MSI Automation interface; you can set the UI level for an installation launched from VBScript code by setting the UILevel property of the Installer object before calling InstallProduct. For example:

Set msi = CreateObject("WindowsInstaller.Installer")
' set the UI level to basic
msi.UILevel = 3
' launch the installer
msi.InstallProduct "C:\Packages\Sample App\SampleApp.msi", ""
' clean up
Set msi = Nothing

Similarly, in C code, you can call MsiSetInternalUI before calling MsiInstallProduct. Note, however, than you cannot change the user-interface of a running installation (that is, inside a custom action).

Contributer: Soumitra Mondal