HOW TO: Use a Log File to Troubleshoot a Windows Installer Application Installation (830613)
The information in this article applies to:
- Microsoft Windows Installer 2.0
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
SUMMARYThis step-by-step article describes how to use a log file to
troubleshoot errors that may occur if you use a Microsoft Windows Installer
package to install an application. Windows Installer uses a log
file to record errors and to record events. You can use the information that appears in the
log file that corresponds to an unsuccessful Windows Installer installation to
troubleshoot any errors that occurred during the installation. The example scenario in this article describes how
to troubleshoot a Windows Installer installation that does not succeed when you try to
install an updated version of an application before you remove an earlier
version of the application. However, you can use the guidelines that this article
discusses to troubleshoot other errors that may occur when you use a
Windows Installer package to install an application. back to the topRequirementsThis
article assumes that you are familiar with the following topics:
- Windows Installer
- Microsoft Visual Studio .NET Setup Projects
The
following list outlines the recommended hardware, software, network
infrastructure, and service packs that you need: - Microsoft Windows 2000, Microsoft Windows XP, or Microsoft
Windows Server 2003
- Visual Studio .NET
back to the topCreate a Setup Project- Start Visual Studio .NET.
- On the File menu, point to
New, and then click Project. The New
Project dialog box appears.
- Under Project Types, click Setup
and Deployment Projects.
- Under Templates, click Setup
Project.
- In the Name text box, type
MyApp.
- Click OK.
back to the topAdd a File and Then Build Your Setup Project- Create a file that is named Readme.txt. To do this, follow
these steps:
- Start a text editor such as Notepad.
- Type the following text in the text
editor:
- On the File menu, click
Save.
- In the Save As dialog box, locate the
folder where you created the MyApp project in the "Create a Setup Project" section of this
article.
- In the File name text box, type
Readme.txt.
- Click Save.
- Switch to Visual Studio .NET.
- On the Project menu, point to
Add, and then click File.
- In the Add Files dialog box, locate and
then click the Readme.txt file that you created in step
1.
- Click Open. The Readme.txt file is added
to the MyApp project.
- On the Build menu, click Build
MyApp. By default, the Setup.exe file is created in the Debug folder
that is located in the MyApp folder.
back to the topInstall the Original Version of Your Application- Start Microsoft Windows Explorer.
- Locate the Setup.exe file that you built in step 6 of the
"Add a File and Then Build Your Setup
Project" section.
- Run the Setup.exe file.
- In the MyApp dialog box, click
Next three times to start installing the MyApp application on
your computer.
- On the Installation Complete page, click
Close to quit your installation.
- In Windows Explorer, locate the folder where you installed
the MyApp application. Notice that the Readme.txt file is located in this
folder.
- In a text editor such as Notepad, open the Readme.txt file. Notice that the
Readme.txt file contains the text that you typed in step 1b of the "Add a File and Then Build Your Setup Project"
section.
back to the topChange the Version of Your Application- Switch to Visual Studio .NET.
- In Solution Explorer, click
MyApp.
- On the View menu, click Properties
Window to select the Properties window for the MyApp
project.
- Change the ProductName property to
UpdatedMyApp.
- Change the Version property to
2.0.0. A Microsoft Development
Environment dialog box that contains the following text
appears:It is recommended that the ProductCode and
PackageCode be changed if you change the version. Do you want to do
this?
- Click No to make sure that you do not change
either the product code or the package code of the MyApp application. If you
use a Windows Installer package to install this version of the MyApp
application before you remove the original version of the application, your
installation will not succeed.
- On the Build menu, click Build
MyApp. By default, the Setup.exe file is recreated in the Debug folder
that is located in the MyApp folder.
back to the topTry to Install the Updated Version of Your Application- Click Start, and then
click Run. The Run dialog box
appears.
- In the Open text box, type
cmd, and then click OK to open a
command prompt.
- At the command prompt, change the directory path to the
directory where you recreated the Setup.exe file in step 7 of the "Change the Version of Your Application"
section.
- At the command prompt, run the following command to try to
install the updated version of your application with the logging feature
enabled:
msiexec /i MyApp.msi /l*
LogFile.txt You receive the following error
message:Another version of this product is already
installed. Installation of this version cannot continue. To configure or remove
the existing version of this product, use Add/Remove Programs on the Control
Panel. Note The /l* command-line option specifies that Windows Installer
will record all information (except verbose output and extra debugging options
that are available only on Windows Server 2003) in the LogFile.txt log
file. - Click OK to dismiss the error
message.
back to the topTroubleshoot Your Installation by Using the Log File- Switch to Windows Explorer.
- In a text editor, open the LogFile.txt log file that you
created in step 4 of the "Try to Install the
Updated Version of Your Application" section. Notice that the log file
contains information that is similar to the following:
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} Note The value {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
represents the product code of an earlier version of your application. Write down whatever this value is for your system. - To determine the name of the earlier version of your
application, you must locate the application that has the product code that you
noticed in step 2. To do this, follow these steps:
- Click Start, and then
click Run. The Run dialog box
appears.
- In the Open text box, type
regedit, and then click OK to start
Registry Editor.
- In Registry Editor, locate and then click the following
registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} Note The {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
value in the subkey should be the same as the value that you wrote down in step 2. - In the right pane of Registry Editor, notice the data
that corresponds to the DisplayName registry entry. Notice
that this data is the name of the earlier version of your application (in this
case, MyApp).
- Remove the earlier version of your application. To do
this, follow these steps:
On Windows 2000- Click
Start.
- Point to Settings, and then click
Control Panel.
- In Control Panel, double-click Add/Remove
Programs.
- In the Add/Remove Programs dialog box, click
MyApp
under Currently installed programs, and then click Remove.
- In the dialog box that appears, click
Yes.
- When the removal process has completed, close the
Add/Remove Programs dialog box, and then close Control
Panel.
On Windows XP- Click Start, and then
click Control Panel.
- Under Pick a category, click Add or Remove Programs.
- In the Add or Remove Programs dialog
box, click
MyApp under Currently installed programs, and then click Remove.
- In the dialog box that appears, click
Yes.
- When the removal process has completed, close the
Add or Remove Programs dialog box, and then close Control
Panel.
On Windows Server 2003- Click
Start, point to Control Panel, and then click
Add or Remove Programs.
- In the Add or Remove Programs dialog
box, click
MyApp under Currently installed programs, and then click Remove. If you receive
a Warning dialog box, click
Continue.
- In the dialog box that appears, click
Yes.
- When the removal process has completed, close the
Add or Remove Programs dialog box, and then close Control
Panel.
back to the topInstall the
Updated Version of Your Application- Switch to the command prompt.
- Make sure that the current directory is the same as the
directory where you recreated the Setup.exe file in step 7 of the "Change the Version of Your Application"
section.
- At the command prompt, run the following command to install
the updated version of your application with the logging feature
enabled:
msiexec /i MyApp.msi /l*
LogFile.txt - In the UpdatedMyApp dialog box, click
Next three times to start installing the UpdatedMyApp
application on your computer.
- On the Installation Complete page, click
Close to quit your installation.
- In Windows Explorer, locate the folder where you installed
the UpdatedMyApp application. Notice that the Readme.txt file is located in
this folder.
- In a text editor, open the Readme.txt file. Notice that the
Readme.txt file contains the text that you typed in step 1b of the "Add a File and Then Build Your Setup Project"
section.
- Switch to Windows Explorer.
- In a text editor, open the LogFile.txt log file that you
created in step 3. Notice that the last line of the LogFile.txt log file
contains the following text:
Product: UpdatedMyApp -- Installation completed successfully. back to the
topREFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
241928
BUG: Error 1376 Using RemoveFile Table with Windows Installer
283243 PRB: Internal Error Message 2351 When You Apply a Windows Installer Patch
299803 PRB: Error 1706 "No Valid Source Could Be Found" When Installing MSI File from Removable Media
316309 Windows Installer Error 1619 When You Install from NTFS-Protected Directories
318705 FIX: Writing .ini Files to Network Location with Windows Installer Results in Error 1913
327533 INFO: List of Bugs That Are Fixed in Windows Installer Version 2.0.2600.3
814341 Windows Installer Installation Stops with an Error Stating System Files Could Not Be Updated
For more information, visit the following Microsoft
Developer Network (MSDN) Web sites: back to the
top
Modification Type: | Minor | Last Reviewed: | 5/23/2005 |
---|
Keywords: | kbCPApplet kbRegistry kbAppSetup kbPDWizard kbIDEProject kbsetup kbDeployment kberrmsg kbHOWTOmaster KB830613 kbAudDeveloper |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|