How to Fix ‘Error opening installation log file’
Error opening installation log file. Verify that the specified log file location exists and is writable
You may experience the message “Error opening installation log file” when you try to uninstall a program using application manager on Windows. This error only occurs if you have Windows Installer Logging enabled, but because of some glitch or conflict, the Windows Installer engine cannot properly write the uninstallation log file.
Error opening installation log file
This usually occurs if the Windows Installer’s application heap becomes freed and because of this, it loses the information about where to store the log file. Windows then attempts to write the log to a default location as a file but fails to do so. This is a very old error and has been addressed by Microsoft officially on their website. The workarounds to this issue are quite simple and straightforward.
What causes ‘Error opening installation log file’?
As discussed above, this error is related to logging of Windows Installer. Logging is basically keeping track of all the installs and uninstalls and storing them. This way you can get the technical details in a text document. A detailed list of why this error might occur is:
- The Windows Installer module is having trouble keeping a log of installs and uninstalls because it doesn’t know where to store the file.
- The Installer is either corrupt or its installation file are missing.
- Windows Explorer is directly related in all of Windows Installer workings. It may be in an error state.
Before you move on with the solutions, make sure that you have administrator privileges. We might be executing some command prompt statements which may need elevated status.
Solution 1: Running the application’s uninstaller
Before you move on to the detailed solutions, it should be noted that it is always recommended to uninstall a program using its own uninstaller. When you uninstall a program using the Windows Application manager, it might not always launch the application’s native uninstaller application.
When you use the application’s native uninstaller, it bypasses all these issues which Windows Installer encounters and uninstalls the program properly after removing all the files. You can find the application’s uninstaller by navigating to its directory and locate the file ‘uninstall.exe’. Run it and follow the on-screen instructions. Make sure that you have administrator access.
Solution 2: Restarting Explorer.exe
Explorer.exe is the process of Windows Explorer which is more like a file manager. However, unlike other simple file managers, it also communicates and transfers information to other modules such as Windows Installer. If it is corrupt or in an error state, you might experience the error message under discussion. Restarting Windows Explorer is also the official fix listed by Microsoft.
- Press Windows + R to bring up the Run Type “taskmgr” in the dialogue box to bring up your computer’s task manager.
- Once in the task manager, click the “Processes” tab located on the top of the new window.
- Now locate the task of Windows Explorer in the list of processes. Click on it and press the “Restart” button present at the bottom left side of the window.
Restarting Explorer.exe – Task manager
- After restarting Windows Explorer, try running the installation file again and check if the error message is resolved.
- If your file manager and desktop icons disappear, you can launch Windows Explorer again manually. Press Windows + R, type ‘explorer.exe’ in the dialogue box and press Enter.
Solution 3: Fixing TMP and TEMP directories
You might also experience this error if the ‘TMP’ and ‘TEMP’ directories of the file are different. This will cause Windows Installer to write to TMP’ but when it will try to read them using the attribute of ‘TEMP’, it will get an error and propagate it to you. We can try referring the values of both towards the same direction so the conflict gets resolved.
- Press Windows + S, type “command prompt” in the dialogue box, right-click on it and select Run as administrator.
- Once in the command prompt, execute the following statement.
Pointing TEMP and TMP to correct location
- Now try running the installation and see if this fixes the problem.
Solution 4: Manually removing the log file
If you still receive this error even after following the above two solutions, you can try to manually remove the INSTALL log file from the application’s directory. There are some cases where there is a log file already with the proper file names. If this happens, Windows Installer doesn’t replace it and gives an error message. We can try manually removing and see if this takes the Installer out of its error state.
- Open your Program files in Local Disk C (this is the default location of installation files. If you installed on some other disk, open that directory) and locate your program.
- Once in the program’s directory, search for the file ‘INSTALL.txt’. Once you locate it, cut it and paste it to some other directory (like the Desktop).
Manually removing LOG file
- Now try running the Installer again and see if this fixed the problem.
In addition to the solutions mentioned above, you can also try the following fixes:
- Running an SFC System File Checker will scan all your Windows files (including Windows Installer) and fix any discrepancies (if present). Open an elevated command prompt and execute the following ‘sfc /scannow’.
- Re-register Windows Installer or Reinstall If Windows Installer is corrupt, you can refresh it manually. The reinstall might fix any missing parts or modules in the program. You can detailed information on how to do this in Microsoft’s official website.
FIX: «Error Opening installation log file» error message when you try to install or uninstall a hotfix for Host Integration Server when some antivirus software programs are installed
Symptoms
When you try to install or uninstall a hotfix for Microsoft Host Integration Server, the operation may fail, and you receive the following error message:
Error Opening installation log file. Verify that the specified log file location exists and is writable.
Note This issue is known to occur on a computer that has some antivirus software programs, such as Forefront Endpoint Protection 2010, installed and enabled.
Cause
This issue occurs because of a timing issue. When you install or uninstall a hotfix, the Setup program (Setup.exe) runs, locking the log file in exclusive mode. Then, the Setup program starts Msiexec.exe. The Setup program tries to write to the log file before the program exits. However, some antivirus software may cause the log file closure to be delayed as the antivirus software is scanning files. This behavior may cause Msiexec.exe to receive a sharing violation when it tries to access the Setup.log file.
Resolution
Hotfix information
Microsoft Host Integration Server 2010
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2010.
Microsoft Host Integration Server 2009
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2009.
For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2645939 Cumulative update package 2 for Host Integration Server 2009
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
FIX: «Error Opening installation log file» error message when you try to install or uninstall a hotfix for Host Integration Server when some antivirus software programs are installed
Symptoms
When you try to install or uninstall a hotfix for Microsoft Host Integration Server, the operation may fail, and you receive the following error message:
Error Opening installation log file. Verify that the specified log file location exists and is writable.
Note This issue is known to occur on a computer that has some antivirus software programs, such as Forefront Endpoint Protection 2010, installed and enabled.
Cause
This issue occurs because of a timing issue. When you install or uninstall a hotfix, the Setup program (Setup.exe) runs, locking the log file in exclusive mode. Then, the Setup program starts Msiexec.exe. The Setup program tries to write to the log file before the program exits. However, some antivirus software may cause the log file closure to be delayed as the antivirus software is scanning files. This behavior may cause Msiexec.exe to receive a sharing violation when it tries to access the Setup.log file.
Resolution
Hotfix information
Microsoft Host Integration Server 2010
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2010.
Microsoft Host Integration Server 2009
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2009.
For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2645939 Cumulative update package 2 for Host Integration Server 2009
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
FIX: «Error Opening installation log file» error message when you try to install or uninstall a hotfix for Host Integration Server when some antivirus software programs are installed
Symptoms
When you try to install or uninstall a hotfix for Microsoft Host Integration Server, the operation may fail, and you receive the following error message:
Error Opening installation log file. Verify that the specified log file location exists and is writable.
Note This issue is known to occur on a computer that has some antivirus software programs, such as Forefront Endpoint Protection 2010, installed and enabled.
Cause
This issue occurs because of a timing issue. When you install or uninstall a hotfix, the Setup program (Setup.exe) runs, locking the log file in exclusive mode. Then, the Setup program starts Msiexec.exe. The Setup program tries to write to the log file before the program exits. However, some antivirus software may cause the log file closure to be delayed as the antivirus software is scanning files. This behavior may cause Msiexec.exe to receive a sharing violation when it tries to access the Setup.log file.
Resolution
Hotfix information
Microsoft Host Integration Server 2010
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2010.
Microsoft Host Integration Server 2009
The hotfix that resolves this issue is included in cumulative update package 2 for Host Integration Server 2009.
For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2645939 Cumulative update package 2 for Host Integration Server 2009
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.
How do I create an installation log?
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
For creating an installation log, you can use a command line which looks like this:
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:
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:
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:
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:
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:
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:
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:
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 Builds 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.
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 an 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:
For information on how to make a custom event appear in the log, please see How to write a specific event in the log