From: William DePalo [MVP VC++] on
"Tim Roberts" <timr(a)probo.com> wrote in message
news:9067o2tlrk2s4fpibrrmjocf3k23opktf3(a)4ax.com...
> SxS is a bizarre and baroque solution to a problem that has been
> adequately
> solved for at least a decade. It is a huge and unnecessary complication.

Thanks for that. I was beginning to think that I was alone.

Regards.
Will


From: David Lowndes on
>> SxS is a bizarre and baroque solution to a problem that has been
>> adequately
>> solved for at least a decade. It is a huge and unnecessary complication.
>
>Thanks for that. I was beginning to think that I was alone.

Rest assured, neither of you are. It's a PITA.

Dave
From: Walter Wang [MSFT] on
Hi,

Sorry for delayed reply. I was doing further researching.

The root cause is: when you set your component as vsdrpCOMSelfReg, it will
get self-registered during setup. Since it's dependent on MFC or ATL
library, the dependent library will be needed at this moment. However, due
to following two reasons:

1) Vista is the first os truely support side by side assembly
2) Windows installer uses two-step installation process to install the
shared side-by-side win32 assemblies:

#MsiAssembly Table [Windows Installer]
http://msdn.microsoft.com/library/en-us/msi/setup/msiassembly_table.asp?fram
e=false
Because assemblies cannot be rolled back after they are committed, Windows
Installer uses a two-step installation process. The interfaces to the
assemblies are created during the installation operations that are
generated by the MsiPublishAssemblies Action. The assemblies are not
committed until successful execution of the InstallFinalize Action. This
means that if you author a custom action or resource that relies on the
assembly, it must be sequenced after the InstallFinalize Action. For
example, if you need to start a service that depends on an assembly in the
Global Assembly Cache (GAC), you must schedule the starting of that service
after the InstallFinalize Action. This means you cannot use the
ServiceControl Table to start the service, instead you must use a custom
action that is sequenced after InstallFinalize.

At this time, the MFC or ATL library is only installed to a local temp
folder (%userprofile%\appdata\local\temp\sxstemp), it's only get commited
to the resulting folder (%windir%\winsxs) after InstallFinalize.



For the standalone vc80 redist package, or if you didn't self-register the
component (use vsdrpDoNotRegister), the installation succeeds. During your
test after installed the vc80 redist package, the manual registration with
regsvr32.exe fails because UAC is turned on: by default, the normal cmd.exe
process is not elevated and the registration will fail with error code
0x80070005 (access denied); if you run the cmd.exe as Administrator
(right-click and select "Run as administrator"), you will find the
registration succeeds.


This behavior is by design on Vista, here're some workaround for this issue:

1) Do not self-register the component, instead, extract the required
registry changes using regcap.exe ("%vs80comntools%\deployment\regcap.exe")
and import the registry into your setup project. This is actually a
recommended way to do in today's modern setup tool.

2) Create a custom action to register the component after InstallFinalize.

3) Remove the merge module from setup, include and call the vc80 redist
package instead.


Hope this helps.


Regards,
Walter Wang (wawang(a)online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

From: Tim Roberts on
wawang(a)online.microsoft.com (Walter Wang [MSFT]) wrote:
>
>Sorry for delayed reply. I was doing further researching.
>
>The root cause is: when you set your component as vsdrpCOMSelfReg, it will
>get self-registered during setup. Since it's dependent on MFC or ATL
>library, the dependent library will be needed at this moment. However, due
>to following two reasons:
>
>1) Vista is the first os truely support side by side assembly

Which, by the way, is NOT a point in its favor.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Preference on
Hi,

I have done a first test with regcap and I will try you use it as the
solution.

Thanks

"Walter Wang [MSFT]" wrote:

> Hi,
>
> Sorry for delayed reply. I was doing further researching.
>
> The root cause is: when you set your component as vsdrpCOMSelfReg, it will
> get self-registered during setup. Since it's dependent on MFC or ATL
> library, the dependent library will be needed at this moment. However, due
> to following two reasons:
>
> 1) Vista is the first os truely support side by side assembly
> 2) Windows installer uses two-step installation process to install the
> shared side-by-side win32 assemblies:
>
> #MsiAssembly Table [Windows Installer]
> http://msdn.microsoft.com/library/en-us/msi/setup/msiassembly_table.asp?fram
> e=false
> Because assemblies cannot be rolled back after they are committed, Windows
> Installer uses a two-step installation process. The interfaces to the
> assemblies are created during the installation operations that are
> generated by the MsiPublishAssemblies Action. The assemblies are not
> committed until successful execution of the InstallFinalize Action. This
> means that if you author a custom action or resource that relies on the
> assembly, it must be sequenced after the InstallFinalize Action. For
> example, if you need to start a service that depends on an assembly in the
> Global Assembly Cache (GAC), you must schedule the starting of that service
> after the InstallFinalize Action. This means you cannot use the
> ServiceControl Table to start the service, instead you must use a custom
> action that is sequenced after InstallFinalize.
>
> At this time, the MFC or ATL library is only installed to a local temp
> folder (%userprofile%\appdata\local\temp\sxstemp), it's only get commited
> to the resulting folder (%windir%\winsxs) after InstallFinalize.
>
>
>
> For the standalone vc80 redist package, or if you didn't self-register the
> component (use vsdrpDoNotRegister), the installation succeeds. During your
> test after installed the vc80 redist package, the manual registration with
> regsvr32.exe fails because UAC is turned on: by default, the normal cmd.exe
> process is not elevated and the registration will fail with error code
> 0x80070005 (access denied); if you run the cmd.exe as Administrator
> (right-click and select "Run as administrator"), you will find the
> registration succeeds.
>
>
> This behavior is by design on Vista, here're some workaround for this issue:
>
> 1) Do not self-register the component, instead, extract the required
> registry changes using regcap.exe ("%vs80comntools%\deployment\regcap.exe")
> and import the registry into your setup project. This is actually a
> recommended way to do in today's modern setup tool.
>
> 2) Create a custom action to register the component after InstallFinalize.
>
> 3) Remove the merge module from setup, include and call the vc80 redist
> package instead.
>
>
> Hope this helps.
>
>
> Regards,
> Walter Wang (wawang(a)online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
>
> ==================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>