Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Windows MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 12-19-2008, 03:12 AM   #1 (permalink)
Rob Hamflett
Guest
 
Posts: n/a
Default CRT merge module problem on Vista 64

I've got a problem with the CRT merge modules that only seems to affect Vista 64. I'm using
Microsoft_VC80_CRT_x86.msm and policy_8_0_Microsoft_VC80_CRT_x86.msm in my installer. On a clean XP
system the installer fails to start my service when these merge modules are missing. If I add them
then everything is fine, so I guess they work. This does not seem to be the case on Vista 64. The
service always fails to start because of the missing dependency. Using Orca I saw that
MsiPublishAssemblies appears after StartServices. Even though it works like this under XP, I tried
moving StartServices to after MsiPublishAssemblies, but this has no affect. At the point where the
installer tells me that it couldn't start the service, there are 2 instances of one of the DLLs in
the Windows\WinSxS folder, but nethier of these locations match the folders that appear in the log
of the installation.

If I just install the relevant DLLs alongside the executable then the service runs fine. I might
have to resort to this.

Is anyone aware of any gotcha I've missed?

Rob
  Reply With Quote
Old 12-19-2008, 03:12 AM   #2 (permalink)
Phil Wilson
Guest
 
Posts: n/a
Default Re: CRT merge module problem on Vista 64

First, it's nothing to do with publishing assemblies. What's happening is
that on Vista Windows uses the .NET Runtime (Fusion) to install the CRT into
WinSxS in the same way that it installs assemblies into the GAC. In both
cases the files are not actually available until the Commit stage of the
install at InstallFinalize.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"Rob Hamflett" <rob@snsys.com> wrote in message
news:OoXzms0PJHA.4884@TK2MSFTNGP04.phx.gbl...
> I've got a problem with the CRT merge modules that only seems to affect
> Vista 64. I'm using Microsoft_VC80_CRT_x86.msm and
> policy_8_0_Microsoft_VC80_CRT_x86.msm in my installer. On a clean XP
> system the installer fails to start my service when these merge modules
> are missing. If I add them then everything is fine, so I guess they
> work. This does not seem to be the case on Vista 64. The service always
> fails to start because of the missing dependency. Using Orca I saw that
> MsiPublishAssemblies appears after StartServices. Even though it works
> like this under XP, I tried moving StartServices to after
> MsiPublishAssemblies, but this has no affect. At the point where the
> installer tells me that it couldn't start the service, there are 2
> instances of one of the DLLs in the Windows\WinSxS folder, but nethier of
> these locations match the folders that appear in the log of the
> installation.
>
> If I just install the relevant DLLs alongside the executable then the
> service runs fine. I might have to resort to this.
>
> Is anyone aware of any gotcha I've missed?
>
> Rob



  Reply With Quote
Old 12-19-2008, 03:12 AM   #3 (permalink)
Rob Hamflett
Guest
 
Posts: n/a
Default Re: CRT merge module problem on Vista 64

I've been rethinking this problem and I can't help but wonder, how are we meant to install a service
that requires the CRT on Vista 64? Is there a different way of doing it for this version of the OS?
Are we supposed to bootstrap the CRT installation first?

Rob

Phil Wilson wrote:
> First, it's nothing to do with publishing assemblies. What's happening is
> that on Vista Windows uses the .NET Runtime (Fusion) to install the CRT into
> WinSxS in the same way that it installs assemblies into the GAC. In both
> cases the files are not actually available until the Commit stage of the
> install at InstallFinalize.
>

  Reply With Quote
Old 12-19-2008, 03:12 AM   #4 (permalink)
Rob Hamflett
Guest
 
Posts: n/a
Default Re: CRT merge module problem on Vista 64

That's good to know. I had thought about that, and tried putting StartServices after
InstallFinalize just to see what would happen. I rather expected this to fail, and so wasn't too
surprised when I got an error that I think was something about not being able to write the script.
Our IT guy got it working on a new machine after he had installed all the latest updates to Vista.
I think I'll just have to work out which one and take things from there. If nothing else I can just
not start the service. It'll be started by the my UI app if it's not already running, so users will
just have to run the UI at least once.

Thanks for the help.

Rob

Phil Wilson wrote:
> First, it's nothing to do with publishing assemblies. What's happening is
> that on Vista Windows uses the .NET Runtime (Fusion) to install the CRT into
> WinSxS in the same way that it installs assemblies into the GAC. In both
> cases the files are not actually available until the Commit stage of the
> install at InstallFinalize.
>

  Reply With Quote
Old 12-19-2008, 03:12 AM   #5 (permalink)
Phil Wilson
Guest
 
Posts: n/a
Default Re: CRT merge module problem on Vista 64

Some people install the CRT as a prereq yes, but others bind to the CRT
statically.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"Rob Hamflett" <rob@snsys.com> wrote in message
news:eAfnTrkRJHA.4524@TK2MSFTNGP06.phx.gbl...
> I've been rethinking this problem and I can't help but wonder, how are we
> meant to install a service that requires the CRT on Vista 64? Is there a
> different way of doing it for this version of the OS? Are we supposed to
> bootstrap the CRT installation first?
>
> Rob
>
> Phil Wilson wrote:
>> First, it's nothing to do with publishing assemblies. What's happening is
>> that on Vista Windows uses the .NET Runtime (Fusion) to install the CRT
>> into WinSxS in the same way that it installs assemblies into the GAC. In
>> both cases the files are not actually available until the Commit stage of
>> the install at InstallFinalize.
>>



  Reply With Quote
Old 12-19-2008, 03:12 AM   #6 (permalink)
Rob Hamflett
Guest
 
Posts: n/a
Default Re: CRT merge module problem on Vista 64

Just though I'd post my fix here for anyone else who comes across this thread. I stopped using
Windows Installer to start the service for me and added a commit Custom Action to it at the end of
the install.

Rob

Rob Hamflett wrote:
> I've been rethinking this problem and I can't help but wonder, how are
> we meant to install a service that requires the CRT on Vista 64? Is
> there a different way of doing it for this version of the OS? Are we
> supposed to bootstrap the CRT installation first?
>
> Rob
>
> Phil Wilson wrote:
>> First, it's nothing to do with publishing assemblies. What's happening
>> is that on Vista Windows uses the .NET Runtime (Fusion) to install the
>> CRT into WinSxS in the same way that it installs assemblies into the
>> GAC. In both cases the files are not actually available until the
>> Commit stage of the install at InstallFinalize.
>>

  Reply With Quote
Old 12-19-2008, 03:12 AM   #7 (permalink)
James Hunter Ross
Guest
 
Posts: n/a
Default Handling the "start" as a custom action...

I have the same issue. I guess I can keep the StopServices action as-is,
without conditions. I like the service to be stopped during uninstall or
upgrade to a newer version.

In fact, when versionNT < 600, I think I'll just allow StartServices to run
as-is.

Since starting the service will not be possible because of CRT/MFC
dependencies when version NT >= 600, I'll need to do a custom action like
you did. What did you do for your CA? I though about invoking NET START
MyServiceName as an easy command to run. Did you do it as VBScript?
CustomDLL function?

I know I'm responding a couple of months after the fact, but hey, it's worth
a try. Thanks!

James


  Reply With Quote
Old 12-19-2008, 03:12 AM   #8 (permalink)
Rob Hamflett
Guest
 
Posts: n/a
Default Re: Handling the "start" as a custom action...

James Hunter Ross wrote:
> What did you do for your CA?


One of the executables we install has the ability to start and stop the service, so I call that with
the appropriate arguments. At some point in another installer I think I might have cheated a bit
and called C:\WINDOWS\system32\sc.exe.

Rob
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:57 AM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com