DTF Bug with new Windows 10 Modern ARP #4857

Closed
wixbot opened this Issue Aug 13, 2015 · 18 comments

Comments

Projects
None yet
6 participants
@wixbot
Collaborator

wixbot commented Aug 13, 2015

Please see:
http://blog.iswix.com/2015/08/dtf-bug-with-new-windows-10-apps-and.html

Summary: Windows 10 has a new screen for invoking uninstalls. It invokes with a different process and current directory. Something about this is causing immediate DTF custom actions to fail to initialize rundll.exe.

Action start 11:22:33: REDACTED.
SFXCA: Failed to create new CA process via RUNDLL32. Error code: 575
CustomAction REDACTED returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

Originally opened by chrpai

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Aug 16, 2015

Collaborator

On Win10 x86, I get:

SFXCA: Extracting custom action to temporary directory: C:\Users\Tester\AppData\Local\Temp\MSIDF5B.tmp-
SFXCA: Binding to CLR version v4.0.30319
SFXCA: Failed to create app domain. Error code 0x80073B20
CustomAction CustomAction1 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

Originally posted by barnson

Collaborator

wixbot commented Aug 16, 2015

On Win10 x86, I get:

SFXCA: Extracting custom action to temporary directory: C:\Users\Tester\AppData\Local\Temp\MSIDF5B.tmp-
SFXCA: Binding to CLR version v4.0.30319
SFXCA: Failed to create app domain. Error code 0x80073B20
CustomAction CustomAction1 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

Originally posted by barnson

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Aug 17, 2015

Collaborator

My CA was compiled for .NET 2.0 and had a CA.Config with useLegacyV2RuntimeActivationPolicy=true and supportedRuntime elements for v4.0 and v2.0.50727. However the log file never got past invoking RunDLL32 so I don't think this matters. Of note all of my machines were 64bit that had been upgraded from Windows 8.1. I'll spin up some VM's tonight and do more scenario testing.

Originally posted by chrpai

Collaborator

wixbot commented Aug 17, 2015

My CA was compiled for .NET 2.0 and had a CA.Config with useLegacyV2RuntimeActivationPolicy=true and supportedRuntime elements for v4.0 and v2.0.50727. However the log file never got past invoking RunDLL32 so I don't think this matters. Of note all of my machines were 64bit that had been upgraded from Windows 8.1. I'll spin up some VM's tonight and do more scenario testing.

Originally posted by chrpai

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Aug 17, 2015

Collaborator

Customer feedback indicates they can only repro on Win 10 x64 not x86. Both clean installs and upgrade installs repro.

Originally posted by chrpai

Collaborator

wixbot commented Aug 17, 2015

Customer feedback indicates they can only repro on Win 10 x64 not x86. Both clean installs and upgrade installs repro.

Originally posted by chrpai

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Aug 18, 2015

Collaborator

SFXCA: Extracting custom action to temporary directory: C:\Users\Tester\AppData\Local\Temp\MSIDF5B.tmp-\
SFXCA: Binding to CLR version v4.0.30319
SFXCA: Failed to create app domain. Error code 0x80073B20
CustomAction CustomAction1 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

Collaborator

wixbot commented Aug 18, 2015

SFXCA: Extracting custom action to temporary directory: C:\Users\Tester\AppData\Local\Temp\MSIDF5B.tmp-\
SFXCA: Binding to CLR version v4.0.30319
SFXCA: Failed to create app domain. Error code 0x80073B20
CustomAction CustomAction1 returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Aug 18, 2015

Collaborator

Candidate for 3.10R2 if we get a fix soon enough.

Release changed from v3.10 to v3.11

Collaborator

wixbot commented Aug 18, 2015

Candidate for 3.10R2 if we get a fix soon enough.

Release changed from v3.10 to v3.11

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Nov 1, 2015

Collaborator

Originally changed by rseanhall
AssignedTo set to shall

Collaborator

wixbot commented Nov 1, 2015

Originally changed by rseanhall
AssignedTo set to shall

@wixbot

This comment has been minimized.

Show comment
Hide comment
@wixbot

wixbot Nov 1, 2015

Collaborator

Wix3 pull request - wixtoolset/wix3#312

Will send wix4 pull request once wix3 is accepted.

Originally posted by rseanhall

Collaborator

wixbot commented Nov 1, 2015

Wix3 pull request - wixtoolset/wix3#312

Will send wix4 pull request once wix3 is accepted.

Originally posted by rseanhall

@wixbot wixbot added bug sdk labels Dec 20, 2015

@wixbot wixbot added this to the v3.11 milestone Dec 20, 2015

rseanhall added a commit to rseanhall/wix4 that referenced this issue Feb 5, 2016

@rseanhall

This comment has been minimized.

Show comment
Hide comment
@rseanhall

rseanhall Feb 5, 2016

Member

@chrpai Fix included in WiX weekly release 3.11.0.129, pull request pending for v4.

Member

rseanhall commented Feb 5, 2016

@chrpai Fix included in WiX weekly release 3.11.0.129, pull request pending for v4.

@kdmandawe

This comment has been minimized.

Show comment
Hide comment
@kdmandawe

kdmandawe May 28, 2016

which version/release should I download that includes the fix for this?

which version/release should I download that includes the fix for this?

@robmen

This comment has been minimized.

Show comment
Hide comment
@robmen

robmen May 28, 2016

Member

WiX v3.11 has the fix.

Member

robmen commented May 28, 2016

WiX v3.11 has the fix.

@kdmandawe

This comment has been minimized.

Show comment
Hide comment
@kdmandawe

kdmandawe May 29, 2016

Thanks Rob. However, after I downloaded and installed v3.11.0.504 from http://wixtoolset.org/releases/ I still encounter the error on installing from "'Apps & Features". I also tried v4.0.3922.0, still no luck. Installing from the command line or control panel all works fine. Help is much appreciated.

Thanks Rob. However, after I downloaded and installed v3.11.0.504 from http://wixtoolset.org/releases/ I still encounter the error on installing from "'Apps & Features". I also tried v4.0.3922.0, still no luck. Installing from the command line or control panel all works fine. Help is much appreciated.

@rseanhall

This comment has been minimized.

Show comment
Hide comment
@rseanhall

rseanhall May 29, 2016

Member

Can you double check that your managed CA dll is being built with the newer MakeSfxCA.exe? If so, then please provide an MSI log with the error.

Member

rseanhall commented May 29, 2016

Can you double check that your managed CA dll is being built with the newer MakeSfxCA.exe? If so, then please provide an MSI log with the error.

@kdmandawe

This comment has been minimized.

Show comment
Hide comment
@kdmandawe

kdmandawe May 29, 2016

Hi Sean, here are the commands I ran:

Candle:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\" -d"SolutionDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\\" -dSolutionExt=.sln -dSolutionFileName=SamplePDV1.sln -dSolutionName=SamplePDV1 -d"SolutionPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1.sln" -dConfiguration=Release -dOutDir=bin\Release\ -dPlatform=x86 -d"ProjectDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\\" -dProjectExt=.wixproj -dProjectFileName=SamplePDV1.wixproj -dProjectName=SamplePDV1 -d"ProjectPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\SamplePDV1.wixproj" -d"TargetDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\\" -dTargetExt=.msi -dTargetFileName=SamplePDV1.msi -dTargetName=SamplePDV1 -d"TargetPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.msi" -out obj\Release\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" Product.wxs

Light:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe" -out "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.msi" -pdbout "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.wixpdb" -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" -contentsfile obj\Release\SamplePDV1.wixproj.BindContentsFileListnull.txt -outputsfile obj\Release\SamplePDV1.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Release\SamplePDV1.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\SamplePDV1.wixproj" obj\Release\Product.wixobj -sice:ICE38 -sice:ICE64

Am I missing something? Thanks.

Hi Sean, here are the commands I ran:

Candle:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe" -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\" -d"SolutionDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\\" -dSolutionExt=.sln -dSolutionFileName=SamplePDV1.sln -dSolutionName=SamplePDV1 -d"SolutionPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1.sln" -dConfiguration=Release -dOutDir=bin\Release\ -dPlatform=x86 -d"ProjectDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\\" -dProjectExt=.wixproj -dProjectFileName=SamplePDV1.wixproj -dProjectName=SamplePDV1 -d"ProjectPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\SamplePDV1.wixproj" -d"TargetDir=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\\" -dTargetExt=.msi -dTargetFileName=SamplePDV1.msi -dTargetName=SamplePDV1 -d"TargetPath=c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.msi" -out obj\Release\ -arch x86 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" Product.wxs

Light:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe" -out "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.msi" -pdbout "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\bin\Release\SamplePDV1.wixpdb" -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" -contentsfile obj\Release\SamplePDV1.wixproj.BindContentsFileListnull.txt -outputsfile obj\Release\SamplePDV1.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Release\SamplePDV1.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile "c:\users\admin\documents\visual studio 2015\Projects\SamplePDV1\SamplePDV1\SamplePDV1.wixproj" obj\Release\Product.wixobj -sice:ICE38 -sice:ICE64

Am I missing something? Thanks.

@rseanhall

This comment has been minimized.

Show comment
Hide comment
@rseanhall

rseanhall May 29, 2016

Member

This bug is about managed custom actions, does your MSI have any? Those commands are for building the MSI, not the managed custom actions.

Member

rseanhall commented May 29, 2016

This bug is about managed custom actions, does your MSI have any? Those commands are for building the MSI, not the managed custom actions.

@kdmandawe

This comment has been minimized.

Show comment
Hide comment
@kdmandawe

kdmandawe May 29, 2016

My CA is calling a java application:

<CustomAction Id="LaunchUninstallPrompt" Directory="dir3D8C2B6BEC447DDCC50D1386BD4CD865" ExeCommand="[SystemFolder]cmd.exe /C start /wait pdv-uninstall-prompt.jar" Return="check" Impersonate='no'/>

This is running fine when ran using cli and control panel but not in ''Apps & Features". I'm thinking this is something similar to the issue resolved here.

My CA is calling a java application:

<CustomAction Id="LaunchUninstallPrompt" Directory="dir3D8C2B6BEC447DDCC50D1386BD4CD865" ExeCommand="[SystemFolder]cmd.exe /C start /wait pdv-uninstall-prompt.jar" Return="check" Impersonate='no'/>

This is running fine when ran using cli and control panel but not in ''Apps & Features". I'm thinking this is something similar to the issue resolved here.

@rseanhall

This comment has been minimized.

Show comment
Hide comment
@rseanhall

rseanhall May 29, 2016

Member

The underlying issue is in Windows Installer, Microsoft will have to fix that. All WiX could do was workaround it in DTF.

Member

rseanhall commented May 29, 2016

The underlying issue is in Windows Installer, Microsoft will have to fix that. All WiX could do was workaround it in DTF.

@aBaechtold

This comment has been minimized.

Show comment
Hide comment
@aBaechtold

aBaechtold Mar 28, 2017

Hi all,
I have downloaded latest v3.11 RC build (3.11.0.1507) and experience what seems to be the same or similar issue with a managed custom action which I have to consume in my installer. You mentioned earlier in the thread: "This bug is about managed custom actions, ..." and "The underlying issue is in Windows Installer, Microsoft will have to fix that. All WiX could do was workaround it in DTF.".
Please elaborate.

Thanks
Andreas

PS: If more information is needed, let me know.
I'm using Visual Studio 15 (v14.0.25431.01 Update 3) and have Win 10 Enterprise 2015 LTSB (x64).
I'm not the owner of the custom action, it's a different team that provides me the custom action.

Here is the log message about the failing CA:
MSI (s) (14:FC) [17:17:51:080]: Executing op: ActionStart(Name=UnRegisterProductInv,,)
MSI (s) (14:FC) [17:17:51:080]: Executing op: CustomActionSchedule(Action=UnRegisterProductInv,ActionType=1025,Source=BinaryData,Target=UnRegisterProduct,)
MSI (s) (14:80) [17:17:51:084]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI2A5E.tmp, Entrypoint: UnRegisterProduct
MSI (s) (14:E0) [17:17:51:085]: Generating random cookie.
MSI (s) (14:E0) [17:17:51:110]: Created Custom Action Server with PID 17476 (0x4444).
MSI (s) (14:6C) [17:17:51:151]: Running as a service.
MSI (s) (14:6C) [17:17:51:154]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Failed to create new CA process via RUNDLL32. Error code: 575
CustomAction UnRegisterProductInv returned actual error code 1603 (note this may not be 100%
accurate if translation happened inside sandbox)
MSI (s) (14:FC) [17:17:51:198]: Note: 1: 2265 2: 3: -2147287035

Following the consumption of the CA:

<CustomAction Id="RegisterProductInv"
              BinaryKey="Installer.CA.dll"
              DllEntry="RegisterProduct"
              Execute="immediate"
              Return="check"/>

<!-- Add uninstall event entry -->
<CustomAction Id="UnRegisterProductInv"
              BinaryKey="Installer.CA.dll"
              DllEntry="UnRegisterProduct"
              Execute ="immediate"
              Return="check"/>

aBaechtold commented Mar 28, 2017

Hi all,
I have downloaded latest v3.11 RC build (3.11.0.1507) and experience what seems to be the same or similar issue with a managed custom action which I have to consume in my installer. You mentioned earlier in the thread: "This bug is about managed custom actions, ..." and "The underlying issue is in Windows Installer, Microsoft will have to fix that. All WiX could do was workaround it in DTF.".
Please elaborate.

Thanks
Andreas

PS: If more information is needed, let me know.
I'm using Visual Studio 15 (v14.0.25431.01 Update 3) and have Win 10 Enterprise 2015 LTSB (x64).
I'm not the owner of the custom action, it's a different team that provides me the custom action.

Here is the log message about the failing CA:
MSI (s) (14:FC) [17:17:51:080]: Executing op: ActionStart(Name=UnRegisterProductInv,,)
MSI (s) (14:FC) [17:17:51:080]: Executing op: CustomActionSchedule(Action=UnRegisterProductInv,ActionType=1025,Source=BinaryData,Target=UnRegisterProduct,)
MSI (s) (14:80) [17:17:51:084]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI2A5E.tmp, Entrypoint: UnRegisterProduct
MSI (s) (14:E0) [17:17:51:085]: Generating random cookie.
MSI (s) (14:E0) [17:17:51:110]: Created Custom Action Server with PID 17476 (0x4444).
MSI (s) (14:6C) [17:17:51:151]: Running as a service.
MSI (s) (14:6C) [17:17:51:154]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Failed to create new CA process via RUNDLL32. Error code: 575
CustomAction UnRegisterProductInv returned actual error code 1603 (note this may not be 100%
accurate if translation happened inside sandbox)
MSI (s) (14:FC) [17:17:51:198]: Note: 1: 2265 2: 3: -2147287035

Following the consumption of the CA:

<CustomAction Id="RegisterProductInv"
              BinaryKey="Installer.CA.dll"
              DllEntry="RegisterProduct"
              Execute="immediate"
              Return="check"/>

<!-- Add uninstall event entry -->
<CustomAction Id="UnRegisterProductInv"
              BinaryKey="Installer.CA.dll"
              DllEntry="UnRegisterProduct"
              Execute ="immediate"
              Return="check"/>
@joeloff

This comment has been minimized.

Show comment
Hide comment
@joeloff

joeloff Sep 12, 2017

I have a question about this issue. I'm seeing something similar with some of my customers where SFXCA reports that it can't find RUNDLL32

SFXCA: Failed to create new CA process via RUNDLL32. Error code: 2

I'm still trying to get a repro VM set up. My first thought was that system32 wasn't in their PATH. The CA in question is quite old and was built with WiX 3.5 long ago. After finding this issue I thought I'd just rebuild the CA using WiX 3.11 anyway just to have all the latest workarounds from DTF.

Reading the original blog post it sounds like the issues are specific to newer versions of Windows. In my case, the issue is showing up on Win7 SP1 (6.1.7601).

I had a look around in the current issues, but didn't see anything mentioning RUNDLL32 returning 2.

joeloff commented Sep 12, 2017

I have a question about this issue. I'm seeing something similar with some of my customers where SFXCA reports that it can't find RUNDLL32

SFXCA: Failed to create new CA process via RUNDLL32. Error code: 2

I'm still trying to get a repro VM set up. My first thought was that system32 wasn't in their PATH. The CA in question is quite old and was built with WiX 3.5 long ago. After finding this issue I thought I'd just rebuild the CA using WiX 3.11 anyway just to have all the latest workarounds from DTF.

Reading the original blog post it sounds like the issues are specific to newer versions of Windows. In my case, the issue is showing up on Win7 SP1 (6.1.7601).

I had a look around in the current issues, but didn't see anything mentioning RUNDLL32 returning 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment