Showing posts with label msi. Show all posts
Showing posts with label msi. Show all posts

Wednesday, July 6, 2011

WIX: Sleep between Custom Actions during installation

If you require to pause your installation between some custom actions, you can use the following:
<Property Id="QtExecDeferred" Value='"ping" -n 15 127.0.0.1'/><CustomAction Id="QtExecDeferred" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
The QtExec allows to run command line silently.

WIX: How to run Command Line silently

WIX provides a Custom Action that allows to run Command line silently - Quiet Execution Custom Action

You should use it exactly the same way as listed in the WIX example. Just put your command in the Properties value.

<Property Id="QtExecCmdLine" Value='"command" parameters'/><CustomAction Id="QtExecExample" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>

Make sure the command has double quotes. For example: '"ping" -n 15 127.0.0.1'

Don't forget to add the WixUtilExtension extension during building the msi package.

Wednesday, December 15, 2010

UAC prevents execution of custom actions during msi installation

In the previous post there was a link to the Robert Flaming's blog where he describes how MSI works with UAC. But I have some additional comments and want write them here:

In the following post Robert describes how permissions change under UAC:

















But what does the NoImpersonate bit means? There are different explanations in different articles. Based on my testing I've found out the following:
When you set Impersonate="no" in WIX for you custom action, it means that the custom action will be executed under the Local System account. And it is fine if you need to do changes with your local system. But if your custom action accesses a remote server it fails.

So, the only way that I've found is to prohibit the msi execution under unprivileged user. You should set the MSIUSEREALADMINDETECTION property to 1 and add a Launch Condition for Privileged that gives an error message about running via an elevated command prompt and then quits the installation.

<Property Id="MSIUSEREALADMINDETECTION" Value="1" />

<Condition Message="The installation should be running with full administrative account. Please run an administrative command prompt and launch installation using msiexec.">
Privileged
</Condition>

Friday, October 22, 2010

Installation hangs on "please wait while the installer finishes determining your disk space requirements"

By a some reason installation may hang on a dialogue with the "Please wait while the installer finishes determining your disk space requirements" message (1, 2)


To solve the issue one of the following solutions may help:

  • Stop the installation and start it again.
  • Start installation from command line with /qr switch (i.e. msiexec /i {name.msi} /qr). (qr swtitch - no interaction with user in dialogue wondows)
  • Move msi to a folder with shorter path and run it from there.

What can be done in the msi project:
Remove SpawnWaitDialog event with CostingComplete = 1 condition
CostFinalize does not work

Tuesday, June 8, 2010

Reduce software installation time

In MSI 5 there’s a new property MSIFASTINSTALL that can be set on the command line or in the Property table to speed up large install packages. It’s a combination of flags that will avoid creation of a system restore point, skip some costing tasks, reduce the frequency of progress messages, or any combination of these.
http://www.verboon.info/index.php/2009/07/reduce-software-installation-time/

Wednesday, May 19, 2010

Reboot request on Windows 2008 during msi uninstall

During uninstalling application, the following message may appear:
"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup."

However, there is no need for reboot as all services are stopped before removing any files.

To suppress reboot request, set the REBOOT property to ReallySuppress

Wednesday, April 28, 2010

Installation process

When we launch Windows Installer engine (by running msiexec.exe) we are launching the client process. Client process will launch the Windows service process.
Log investigation is always helpfull. Read about logs here. The article contains link to a document where log file is explained in more details. Here the link for the document (Annotated_Windows_Installer_Log)

Upd:
one more article about installation phases
how to read Windows Installer Verbose log article
custom actions article