N
Norman Diamond
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet
Framework 2. Options are set in the setup project properties, so if these
two dependencies are not already installed then this installer will install
them.
But what about the situation where VC runtime has already been installed?
In fact it's been installed twice. Although the project was built on a
Windows XP system with Visual Studio 2005 SP1 and the results were copied to
a Vista system to be installed, it happens that this Vista system already
has Visual Studio 2005 SP1 plus Vista hotfix. And since a project which
requires VC runtime has already been installed on this Vista system, that
project's installer already installed a second copy of VC runtime. So here
we are with Visual Studio 2005 SP1 building an installer which tries to
install a third copy of VC runtime, and this fails with MSI error 1638.
Due to this failure, the installer proceeds to refuse to install the
application.
For some reason the installer figures out that DotNet Framework 2 is already
installed (one copy or two I'm not sure), so it doesn't try to install an
extra copy of that.
Since it seems that the maximum allowable number of redundant copies of the
VC runtime from Visual Studio 2005 SP1 is two, and a third one fails, is
there some way to tell Visual Studio 2005 SP1 to build an installer which
will only try to install the VC runtime when the maximum allowable number of
redundant copies hasn't been reached yet?
Here's the log of the installation failure.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 6.0.0 {version}
Running checks for package '.NET Framework 2.0', phase BuildList
Running external check with command line
"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\dotnetfx\dotnetchk.exe" -lcid:1041
Process exited with code 2
Setting value '2 {int}' for property 'DotNetInstalled'
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet
Explorer'
Read string value '7.0.6000.16575'
Setting value '7.0.6000.16575 {string}' for property 'IEVersion'
The following properties have been set for package '.NET Framework 2.0':
Property: [DotNetInstalled] = 2 {int}
Property: [IEVersion] = 7.0.6000.16575 {string}
Running checks for command 'dotnetfx\instmsia.exe'
Result of running operator 'ValueExists' on property 'VersionNT': true
Result of checks for command 'dotnetfx\instmsia.exe' is 'Bypass'
Running checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'ValueExists' on property 'Version9x': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.0.3': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property
'VersionMsi' and value '3.0': true
Result of checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
is 'Bypass'
Running checks for command 'dotnetfx\dotnetfx.exe'
Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled'
and value '0': true
Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Bypass'
Running checks for command 'dotnetfx\langpack.exe'
Result of running operator 'ValueEqualTo' on property 'DotNetInstalled' and
value '2': true
Result of checks for command 'dotnetfx\langpack.exe' is 'Bypass'
'.NET Framework 2.0' RunCheck result: No Install Needed
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
BuildList
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Install Needed
Installation of components 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' was
accepted.
Copying files to temporary directory
"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\"
Copying from
'C:\censored\CensoredSetup\Release\vcredist_x86\vcredist_x86.exe' to
'E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe'
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
BeforePackage
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Install Needed
Verifying file integrity of
E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe
Verifying file hash
Installing using command line
'"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe"
/q:a '
Process exited with code 0
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
AfterPackage
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Unknown
Launching Application.
Using MsiInstallProduct with package path
'C:\censored\CensoredSetup\Release\LDAdjustmentSetup.msi' and command line
''
MsiInstallProduct returned '1638'
Error:
Status of package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' after install is
'InstallUnknown'
Framework 2. Options are set in the setup project properties, so if these
two dependencies are not already installed then this installer will install
them.
But what about the situation where VC runtime has already been installed?
In fact it's been installed twice. Although the project was built on a
Windows XP system with Visual Studio 2005 SP1 and the results were copied to
a Vista system to be installed, it happens that this Vista system already
has Visual Studio 2005 SP1 plus Vista hotfix. And since a project which
requires VC runtime has already been installed on this Vista system, that
project's installer already installed a second copy of VC runtime. So here
we are with Visual Studio 2005 SP1 building an installer which tries to
install a third copy of VC runtime, and this fails with MSI error 1638.
Due to this failure, the installer proceeds to refuse to install the
application.
For some reason the installer figures out that DotNet Framework 2 is already
installed (one copy or two I'm not sure), so it doesn't try to install an
extra copy of that.
Since it seems that the maximum allowable number of redundant copies of the
VC runtime from Visual Studio 2005 SP1 is two, and a third one fails, is
there some way to tell Visual Studio 2005 SP1 to build an installer which
will only try to install the VC runtime when the maximum allowable number of
redundant copies hasn't been reached yet?
Here's the log of the installation failure.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 6.0.0 {version}
Running checks for package '.NET Framework 2.0', phase BuildList
Running external check with command line
"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\dotnetfx\dotnetchk.exe" -lcid:1041
Process exited with code 2
Setting value '2 {int}' for property 'DotNetInstalled'
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet
Explorer'
Read string value '7.0.6000.16575'
Setting value '7.0.6000.16575 {string}' for property 'IEVersion'
The following properties have been set for package '.NET Framework 2.0':
Property: [DotNetInstalled] = 2 {int}
Property: [IEVersion] = 7.0.6000.16575 {string}
Running checks for command 'dotnetfx\instmsia.exe'
Result of running operator 'ValueExists' on property 'VersionNT': true
Result of checks for command 'dotnetfx\instmsia.exe' is 'Bypass'
Running checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'ValueExists' on property 'Version9x': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.0.3': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property
'VersionMsi' and value '3.0': true
Result of checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
is 'Bypass'
Running checks for command 'dotnetfx\dotnetfx.exe'
Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled'
and value '0': true
Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Bypass'
Running checks for command 'dotnetfx\langpack.exe'
Result of running operator 'ValueEqualTo' on property 'DotNetInstalled' and
value '2': true
Result of checks for command 'dotnetfx\langpack.exe' is 'Bypass'
'.NET Framework 2.0' RunCheck result: No Install Needed
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
BuildList
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Install Needed
Installation of components 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' was
accepted.
Copying files to temporary directory
"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\"
Copying from
'C:\censored\CensoredSetup\Release\vcredist_x86\vcredist_x86.exe' to
'E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe'
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
BeforePackage
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Install Needed
Verifying file integrity of
E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe
Verifying file hash
Installing using command line
'"E:\Users\soft1\AppData\Local\Temp\VSDBA68.tmp\vcredist_x86\vcredist_x86.exe"
/q:a '
Process exited with code 0
Running checks for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)', phase
AfterPackage
Running MsiProductCheck with ProductCode
'{A49F249F-0C91-497F-86DF-B2585E8E76B7}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vcredist_x86\vcredist_x86.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property
'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value
'false': false
Skipping FailIf because Property 'Version9X' was not defined
Result of running operator 'VersionLessThan' on property 'VersionNT' and
value '5.00': false
Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' RunCheck result: Unknown
Launching Application.
Using MsiInstallProduct with package path
'C:\censored\CensoredSetup\Release\LDAdjustmentSetup.msi' and command line
''
MsiInstallProduct returned '1638'
Error:
Status of package 'Visual C++ $B%i%s%?%$%`(B $B%i%$%V%i%j(B (x86)' after install is
'InstallUnknown'