[cvsnt] Re: Problem with post install custom action
Casey Schmit
cschmit at winternals.com
Thu Apr 7 20:46:43 BST 2005
I'll agree, that the executable directory should always be searched when
looking for the DLL. My guess is that whatever is running, isn't running
from the <Program Files>\CVSNT directory, which is where the new C and C++
runtime are installed(per MS's redist recommendations).
Here's the full skinny, with some additional info. I just installed Windows
Server 2003, a completely fresh install. The only role defined is an
application server so that I can get IIS installed. This bare install does
not contain any of the runtime files. Install CVSNT. Everything installs
and starts running, however when it hits the "Removing Backup Files" point
of the install it pops up a dialog that says "There is a problem with this
Windows Installer package. A program run as part of the setup did not
finish as expected. Contact your support personnel or package vendor."
Everything is still installed and running, although it's hard to convince
people to use CVSNT when the installer doesn't kick over entirely.
Here are the compelling pieces from the MSI log file and a filemon trace.
MSI log file:
Action ended 12:25:55: InstallFinalize. Return value 1.
MSI (s) (74:B4): Doing action: RemoveExistingProducts
Action start 12:25:55: RemoveExistingProducts.
Action ended 12:25:55: RemoveExistingProducts. Return value 1.
MSI (s) (74:B4): Doing action: RunPostinst
Action start 12:25:56: RunPostinst.
MSI (s) (74:B4): Note: 1: 1722 2: RunPostinst 3:
C:\WINDOWS\Installer\MSI146.tmp 4:
It appears to be launching MSI146.tmp, which according the to MSI
documentation is correct, since the custom action is of type 2. "When the
custom action is invoked, the stream data is copied to a temporary file,
which is then processed depending upon the type of custom action." This
makes sense based on the filemon log when attempting to load up this file:
msiexec.exe:884 SET INFORMATION C:\WINDOWS\Installer\MSI146.tmp SUCCESS
Length: 0
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 0
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 512
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 1024
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 1536
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 2048
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 2560
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 3072
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 3584
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 4096
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 4608
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 5120
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 5632
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 6144
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 6656
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 7168
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 7680
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 8192
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 8704
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 9216
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 9728
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 10240
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 10752
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 11264
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 11776
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 12288
Length: 512
msiexec.exe:884 WRITE C:\WINDOWS\Installer\MSI146.tmp SUCCESS Offset: 12800
Length: 512
msiexec.exe:884 CLOSE C:\WINDOWS\Installer\MSI146.tmp SUCCESS
msiexec.exe:884 QUERY INFORMATION C:\WINDOWS\Installer\MSI146.tmp SUCCESS
Attributes: A
msiexec.exe:884 QUERY INFORMATION C:\WINDOWS\Installer\MSI146.tmp SUCCESS
Attributes: A
msiexec.exe:884 OPEN C:\WINDOWS\Installer\MSI146.tmp SUCCESS Options: Open
Access: All
msiexec.exe:884 QUERY INFORMATION C:\WINDOWS\Installer\MSI146.tmp SUCCESS
Length: 13312
msiexec.exe:884 OPEN C:\WINDOWS\Installer\MSI146.tmp.Manifest FILE NOT FOUND
Options: Open Access: All
msiexec.exe:884 CLOSE C:\WINDOWS\Installer\MSI146.tmp SUCCESS
MSI146.tmp:1648 OPEN C:\WINDOWS\system32\ SUCCESS Options: Open Directory
Access: Traverse
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\Installer\MSI146.tmp.Local FILE
NOT FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\Installer\MSVCP71.dll FILE NOT
FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\system32\MSVCP71.dll FILE NOT
FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\system\MSVCP71.dll FILE NOT
FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\MSVCP71.dll FILE NOT FOUND
Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\system32\MSVCP71.dll FILE NOT
FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\system32\MSVCP71.dll FILE NOT
FOUND Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\MSVCP71.dll FILE NOT FOUND
Attributes: Error
MSI146.tmp:1648 QUERY INFORMATION C:\WINDOWS\System32\Wbem\MSVCP71.dll FILE
NOT FOUND Attributes: Error
MSI146.tmp:1648 CLOSE C:\WINDOWS\system32\ SUCCESS
msiexec.exe:884 OPEN C:\WINDOWS\Installer\MSI146.tmp SUCCESS Options: Open
Access: All
msiexec.exe:884 DELETE C:\WINDOWS\Installer\MSI146.tmp SUCCESS
msiexec.exe:884 CLOSE C:\WINDOWS\Installer\MSI146.tmp SUCCESS
It appears that it is extracting out the binary from the Binary table and
then executing it. It cannot find the msvcp71.dll. Which makes sense since
that file isn't in the C:\Windows\Installer directory. By changing the
custom action type to 18, it properly references the installed file, not the
one extracted from the binary table. It also requires the case change,
since Postinst.exe does not exist in the file table, it is postinst.exe.
So while the installer is running postinst.exe, it appears to not be running
the one you think it is.
Hopefully this can help you track it down.
Thanks,
Casey
"Tony Hoyle" <tmh at nodomain.org> wrote in message
news:d33m70$9c0$1 at paris.nodomain.org...
> Casey Schmit wrote:
>> The installer should either lay these files down into the system32
>> directory(since they are packaged as part of the install anyways) or the
>
> It's forbidden by MS to do this.
>
>> custom action should be statically linked to the C runtime. Once these
>> files were added to the system32 directory, the install completed without
>> a
>> problem.
>
> The files are in the same directory as the postinst.exe, where the
> executable resides. This works as documented - the executable directory
> is always searched. Part of the release testing is installing on clean
> systems and if it didn't work it would have been noticed long before this.
>
> Tony
More information about the cvsnt
mailing list