How do I create an installation log?
Quote from:
http://www.advancedinstaller.com/user-guide/qa-log.html
Windows Installer logging
Windows Installer handles its installations through Msiexec.exe. The logging options offered by this tool allow you to create different types of logs, depending on the information you need about the installation. These options are:
- i - Status messages
- w - Nonfatal warnings
- e - All error messages
- a - Start up of actions
- r - Action-specific records
- u - User requests
- c - Initial UI parameters
- m - Out-of-memory or fatal exit information
- o - Out-of-disk-space messages
- p - Terminal properties
- v - Verbose output
- x - Extra debugging information
- + - Append to existing log file
- ! - Flush each line to the log
- * - Log all information, except for v and x options
The logging command is issued by the /L parameter. The above options can be used only after this parameter (the options cannot be used by themselves).
Create a log
The most used logging command is /L*V. This command will create a verbose log which offers a lot of information about the installation. Here are the steps for creating a log:
- find out the path of the MSI file, for example C:\MyPackage\Example.msi
- decide the path of the log, for example C:\log\example.log
- open cmd.exe (you can use any command shell)
- use the msiexec command line to launch the MSI with logging parameters
Install Log
For creating an installation log, you can use a command line which looks like this:
msiexec /i "C:\MyPackage\Example.msi" /L*V "C:\log\example.log"
The /i parameter will launch the MSI package. After the installation is finished, the log is complete.
The example command line uses the sample paths in this How-To. For your package you must use the path of your MSI file.
Note that any logging command line should have this form:
msiexec /i <path_to_msi> /L*V <path_to_log>
After you use the logging command, you need to specify the log's complete path. If you want the log to be created next to the MSI, you can specify only the name of the log file:
msiexec /i "C:\MyPackage\Example.msi" /L*V "example.log"
When the package is included in an EXE bootstrapper, the command line no longer uses "msiexec". For example, the command line can look like this:
"C:\MyPackage\Setup.exe" /L*V "example.log"
Uninstall Log
In order to create a log for an uninstall process, you can replace the /i parameter with /x. Therefore, a command line which creates a log for an uninstall can look like this:
msiexec /x "C:\MyPackage\Example.msi" /L*V "C:\log\example.log"
The package path can also be replaced by the package Product Code (it can be obtained by using the Project -> Options menu inside the project). The command line would look like this:
msiexec /x {B40D5AC5-6120-4AD6-BBD4-AF5EF7E04351} /L*V "C:\log\example.log"
When the package is included in an EXE bootstrapper and it's already installed on the machine, you can launch the installer again with the logging command. For example:
"C:\MyPackage\Setup.exe" /L*V "example.log"
This will make the package go into maintenance mode and you can choose to uninstall it. Since the package was launched with logging, an uninstall log will be generated.
Patch Install Log
You can create a log for a patch installation by using the /p parameter instead of /i:
msiexec /p "C:\MyPackage\Patch.msp" /L*V "C:\log\patch.log"
Use the EXE boostrapper
Another approach is to create a log file by using the /L*V parameters in the command line of the Advanced Installer Bootstrapper. Also, these parameters can be always passed to the MSI when the package is launched through the EXE bootstrapper.
If you want your installation package to always create a log, you can follow these steps:
- open your installation package's Advanced Installer project
- go to the Media page and select the Configuration Settings Tab tab
- check the EXE setup option
- set the MSI Command Line field to: /L*V "C:\package.log"
This way, when the user launches the installation through the bootstrapper, an installation log ("package.log") will be created automatically in the "C:\" drive.
The command line received by the bootstrapper overrides the command line in the "MSI Command Line" field. Therefore, if you launch an EXE package with logging parameters, these parameters will be used for creating the log.
Automated logging with the Windows Installer Logging Policy
The logging policy is particularly useful for troubleshooting Active Directory/Group Policy deployments, in which case the installation is carried out without a user interface and there is no possibility to specify a command line for the MSI package.
In order to enable this option, you need to import the registry settings below. Please create a new text file with a ".reg" extension and then copy the following lines into it. After this, double click the ".reg" file you just created and answer "Yes" to the confirmation prompt.
REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"
"Debug"=dword:00000007
The .LOG file will be created in the currently logged on user's Temp folder and will have a name in the following format: "MSI*.LOG".
In case of a Active Directory/GPO deployment, there will be no logged on user at the time the installation occurs. In this case the log file will be created in the "Windows\Temp" folder.
This option should not be left active since every install/uninstall operation of a MSI package will create a new log file, thus unnecessarily occupying disk space. Therefore, this option should only be used for debugging purposes.
In order to disable the debugging policy, you can delete the registry values you have previously added using "RegEdit.exe" or you can import the following .reg file as you did with the previous one:
REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Debug"=-
For information on how to make a custom event appear in the log, please see How to write a specific event in the log ?
How do I create an installation log?的更多相关文章
- Microsoft Windows Installer 工具 Msiexec.exe 的命令行选项
摘自:http://support.microsoft.com/kb/314881/zh-cn 概要 本文列出了 Windows Installer 工具 Msiexec.exe 的命令行选项.Msi ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- Openstack: Single node Installation and External Network Accessing Configuration Guide
Summary of installation Step 0: Prerequisites Step 1: Create Openstack hostsystem Step 2: Config Ope ...
- 【英文文档】Solidifier for Windows Installation Guide
Page 1Solidifier for Windows Installation Guide Page 2McAfee, Inc.McAfee® Solidifier for Windows In ...
- saturne installation on Ubuntu
test installation Table of Contents 1. installation guide 1 installation guide saturne_installation. ...
- 使用Object.create 克隆对象以及实现单继承
var Plane = function () { this.blood = 100; this.attack = 1; this.defense = 1; }; var plane = new Pl ...
- [AlwaysOn Availability Groups]CLUSTER.LOG(AG)
CLUSTER.LOG(AG) 作为故障转移资源,在SQL Server和windows故障转移集群服务的资源DLL(hadrres.dll)之间有额外的内部交流,DLL无法被SQL Server监控 ...
- 基本类型和引用类型调用是的区别(Object.create)
var person = { name : 'jim', address:{ province:'浙', city:'A' } } var newPerson = Object.create(pers ...
- How to configure Veritas NetBackup (tm) to write Unified and Legacy log files to a different directory
Problem DOCUMENTATION: How to configure Veritas NetBackup (tm) to write Unified and Legacy log files ...
随机推荐
- 剑指OFFER之字符串的排列(九度OJ1369)
题目描述: 输入一个字符串,按字典序打印出该字符串中字符的所有排列.例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc,acb,bac,bca,cab和cba. 输入: 每个 ...
- 利用接口做参数,写个计算器,能完成+-*/运算 (1)定义一个接口Compute含有一个方法int computer(int n,int m); (2)设计四个类分别实现此接口,完成+-*/运算 (3)设计一个类UseCompute,含有方法: public void useCom(Compute com, int one, int two) 此方法要求能够:1.用传递过来的对象调用compute
package com.homework5; public interface Compute { //声明抽象方法 int computer(int n,int m); } package com. ...
- C#-datagridview隐藏行头
在进行datagridview的设置的过程中,常常会遇到需要设定datagridview1的行头显示,这就需要用到datagridview的属性: RowHeadersVisible属性设置为fals ...
- OpenVPN 如何记住用户名和密码
最近在使用OpenVPN,但是没有记住用户名和密码功能,太坑人,研究一下发现是可以的. 1. 在OpenVPN安装目录下\OpenVPN\config文件夹中找到vpnserver.ovpn文件. 2 ...
- 图像的稀疏表示——ScSPM和LLC的总结
前言 上一篇提到了SPM.这篇博客打算把ScSPM和LLC一起总结了.ScSPM和LLC其实都是对SPM的改进.这些技术,都是对特征的描述.它们既没有创造出新的特征(都是提取SIFT,HOG, RGB ...
- java大数总结【转】
java大数(2013长春网络赛)--hdu4762总结一下:1.java提交类要写Main.2.读取大数. Scanner read=new Scanner(System.in); BigInteg ...
- 【甘道夫】HBase基本数据操作的详细说明【完整版,精绝】
介绍 之前具体写了一篇HBase过滤器的文章.今天把基础的表和数据相关操作补上. 本文档參考最新(截止2014年7月16日)的官方Ref Guide.Developer API编写. 全部代码均基于& ...
- eclipse代码提示框背景色改动
因为个人习惯,喜欢把eclipse的文本编辑框背景调成全黑色,可是代码提示框的默认背景色也是黑色.所以两者就冲突了.导致看不到代码提示框的内容. 后来发现代码提示框的背景色能够改动.改动内容例如以下: ...
- android125 zhihuibeijing 缓存
## 三级缓存 ## - 内存缓存, 优先加载, 速度最快 - 本地缓存(内存卡), 次优先加载, 速度快 - 网络缓存, 不优先加载, 速度慢,浪费流量 package com.itheima.zh ...
- javascript 引擎Rhino源代码分析 浅析 实例函数对象及this
http://blog.csdn.net/liantian_wu/article/details/49797481