Process exited with code 5100 while installing ClickOnce setup built in VS 2013 - visual-studio-2013

Similar thread,
I am using Windows 7 Enterprise SP1 64-bit OS. I have created a deployment project with prerequisite as .NET framework 4.5.1 in Visual Studio 2013 professional.
If I launch the .net framework setup separately then I don't observe any problem and it installs properly.
When I launch setup.exe,
- It first shows the EULA screen, I hit ACCEPT button
- It shows Installing progress for .NET framework 4.5.1 (it prompts me to allow permission elevation)
- Suddenly it shows below error and stops.
The log file snap looks like below,
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = SameSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.0 {version}
Running checks for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)', phase BuildList
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Unable to read registry value
Not setting value for property 'DotNet45Full_Release'
The following properties have been set for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)':
Running checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
Skipping ByPassIf because Property 'DotNet45Full_Release' was not defined
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionNT' and value '6.3.0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.0': false
Result of running operator 'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64': false
Result of checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' is 'Install'
Running checks for command 'DotNetFX451\NDP451-KB2859818-Web.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX451\NDP451-KB2859818-Web.exe' is 'Bypass'
'Microsoft .NET Framework 4.5.1 (x86 and x64)' RunCheck result: Install Needed
EULA for components 'Microsoft .NET Framework 4.5.1 (x86 and x64)' was accepted.
Copying files to temporary directory "C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\"
Copying from 'C:\Users\user001\Desktop\NET framework\Products\Release\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' to 'C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Verifying file integrity of C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)', phase BeforePackage
Reading value 'Release' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full'
Unable to read registry value
Not setting value for property 'DotNet45Full_Release'
The following properties have been set for package 'Microsoft .NET Framework 4.5.1 (x86 and x64)':
Running checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': false
Skipping ByPassIf because Property 'DotNet45Full_Release' was not defined
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionNT' and value '6.3.0': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.0.0': false
Result of running operator 'ValueEqualTo' on property 'ProcessorArchitecture' and value 'IA64': false
Result of checks for command 'DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' is 'Install'
'Microsoft .NET Framework 4.5.1 (x86 and x64)' RunCheck result: Install Needed
Verifying file integrity of C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\user001\AppData\Local\Temp\VSDA8FB.tmp\DotNetFX451\NDP451-KB2858728-x86-x64-AllOS-ENU.exe' and parameters ' /q /norestart /ChainingPackage FullX64Bootstrapper'
Process exited with code 5100
Status of package 'Microsoft .NET Framework 4.5.1 (x86 and x64)' after install is 'InstallFailed'
I don't know what problem it is hitting. Any help in resolving this is much appreciated.

I figured it out that the setup.exe was running in compatibility mode and it was blocking .net framework.
I checked the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX451\Product.xml file and removed the Agrument attribute values just to check what error it is throwing. It threw
Blocking Issue
.NET Framework Setup cannot be run in Program Compatibility Mode.
I removed this compatibility settings from setup.exe and it works fine now.

Related

Windows App Cert Kit: InstallLocation False Failure

I built an MSI using the WIX Toolset. In the MSI I use:
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize"/>
to set the InstallLocation regkey. When testing with the App Cert Kit I get the failure:
A non-optional value 'InstallLocation' is missing or invalid for program.
After checking the registry on my PC and another's the correct registry key
InstallLocation: C:\Program Files\*program_name*\
is present on both in the correct location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}.
I tried consulting a related question but honestly have no idea what the solution is saying. I also tried running the Cert Kit on the other computer but to no avail. Is this a known bug in the Cert Kit or is that not a valid InstallLocation?

"Invalid procedure call or argument" error on "New ADODB.Connection" only if compiled on Windows 7

I'm experiencing some problem when I compile some legacy apps on VB6 since I got a new development machine in windows 7. (my old one was on Windows XP.)
If I compile the project on my XP machine, everything is fine.
If I compile the same project on my Windows 7 machine, it still run fine one it, but if I try to run it on a XP machine, I got this error.
Error Number : 5
Description : Invalid procedure call or argument
Thanks to my error handler, I know that the line that throw this error is :
Dim objConn As ADODB.Connection
--> Set objConn = New ADODB.Connection
I compared the references on both machines and the Project - References are the same : (Microsoft ActiveX Data Objects 2.7 Library)
What could cause this error?
This is a known problem in SP1 for Win7 which will be fixed in SP2.
The way to handle the issue in SP1 is to copy the old ADO typelib file from Win7 RTM in C:\Program Files (x86)\Common Files\System\ado and register it there.
Registering this old ADO typelib is not a trivial task as numerous forum threads have shown. Here is a batch file we use in our shop to fix ADO typelib issue:
#echo off
set regtlib="%windir%\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe"
set subinacl="%~dp0subinacl.exe"
set target_dir=%CommonProgramFiles%\System\ado
if not "%CommonProgramFiles(x86)%"=="" set target_dir=%CommonProgramFiles(x86)%\System\ado
copy "%~dp0msado28_old.tlb" "%target_dir%\msado28_old.tlb" > nul
%subinacl% /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C} /setowner=Administrators > nul
%subinacl% /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C} /grant=Administrators=F > nul
%subinacl% /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C} /setowner=Administrators > nul
%subinacl% /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\TypeLib\{2A75196C-D9EB-4129-B803-931327F72D5C} /grant=Administrators=F > nul
%regtlib% -u "%target_dir%\msado28.tlb"
%regtlib% "%target_dir%\msado28_old.tlb"
You need both msado28_old.tlb and subinacl.exe placed in the same folder as the install.bat file and .NET Framework 4.0 setup for the regtlibv12.exe utility.
Now you can recompile your projects referencing ADO on the Win7 box with no compatibility issues on previous versions of Windows.
This is a known Microsoft issue, but I don't think it was a bug; I believe compatibility was broken for security reasons. The problem could have existed on a non-SP1 builds if you had a certain hotfix installed. There are a couple of options referenced in the Microsoft KB. Here is another article providing an update.
We ran into this problem and we decided to deploy the Backwards Compatibility patch on all developer machines and replace all legacy ADO references with the Backwards Compatibility reference. This has worked well for us.

Visual Studio 2010 SP1 setup project doesn't install SP1 of Visual C++ 2010 Runtime Libraries

I'm using VS 2010 SP1 and I've created a VS setup project to install my app. My app uses a DLL written in C++ so I need to include the VC++ 2010 Runtime Libraries.
One of my users reported getting an error while running my installer and I traced it down to the fact that this user already has the SP1 version of the VC++ 2010 Runtime Library installed. My installer tried to install the non-SP1 version and then quit when it saw a newer version already installed (the SP1 version).
I've confirmed this is the source of the problem here: http://social.microsoft.com/Forums/en/crm/thread/db84d4c3-c58e-4ff9-997f-f4e0116bf043 and http://notepad.patheticcockroach.com/1666/installing-visual-c-2010-and-windows-sdk-for-windows-7-offline-installer-and-installation-troubleshooting/
It seems like the only workaround for users is to uninstall the SP1 runtime library and then run my installer. Obviously this is not ideal so I'm looking for a better solution.
The only one I've come up with is to tell my VS setup project to download the runtime library from Microsoft's SP1 link instead (http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe). I'm a little worried because this feels like a hack. Anyone have any better ideas?
If it's helpful, here's the install log from the user who hit this bug:
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BuildList
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (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++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Running checks for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)', phase BuildList
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Client'
Read string value '4.0.30319'
Setting value '4.0.30319 {string}' for property 'DotNet40Client_TargetVersion'
The following properties have been set for package 'Microsoft .NET Framework 4 Client Profile (x86 and x64)':
Property: [DotNet40Client_TargetVersion] = 4.0.30319 {string}
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe'
Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_x86_x64.exe' is 'Bypass'
Running checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe'
Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet40Client_TargetVersion' and value '4.0.30129': true
Result of checks for command 'DotNetFX40Client\dotNetFx40_Client_setup.exe' is 'Bypass'
'Microsoft .NET Framework 4 Client Profile (x86 and x64)' RunCheck result: No Install Needed
Installation of components 'Visual C++ 2010 Runtime Libraries (x86)' was accepted.
Copying files to temporary directory "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
Downloading files to "C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\"
(14-12-2011 14:03:32) Downloading 'vcredist_x86\vcredist_x86.exe' from 'http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409' to 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\'
Download completed at 14-12-2011 14:05:00
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Running checks for package 'Visual C++ 2010 Runtime Libraries (x86)', phase BeforePackage
Running MsiProductCheck with ProductCode '{196BB40D-1578-3D01-B289-BEFC77A11A1E}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ 2010 Runtime Libraries (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++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
Verifying file integrity of C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe
WinVerifyTrust returned 0
File trusted
Installing using command 'C:\Users\JAGDISH\AppData\Local\Temp\VSD653B.tmp\vcredist_x86\vcredist_x86.exe' and parameters ' /q:a '
Process exited with code 5100
Status of package 'Visual C++ 2010 Runtime Libraries (x86)' after install is 'InstallFailed'
Predefined prerequisites in Visual Studio setup projects are not very good. The fact that they are rarely updated is also a problem.
So the best solution is to create your own custom prerequisite. Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.
These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.
After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
This way you can select the prerequisite in your setup project property pages.
Your custom prerequisite can detect both the original runtime and the SP1. You can find the SP1 detection criteria here: http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx
I was able to solve this by adding the target output of my c++ DLL to the setup project. Once I did this, the setup project automatically bundled the appropriate c++ dll's with my installer and now everything runs fine.
The original problem was caused by the fact that I had manually checked "C++ Runtime libraries" in the setup project's prerequisites.
#Cosmin Pirvu -- your solution may work, but this is what I ended up doing.

How to integrate NCover and MSTest 10.0?

Using NCover Community edition, I tried:
set ncover="C:\Program Files (x86)\NCover\NCover.Console.exe"
set mstest="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe"
set testdllfolder="C:\.hudson\jobs\Project\workspace\src\TestProject\bin\Debug"
%ncover% //x coverage.xml //w %testdllfolder% %mstest% /noisolation /testcontainer:TestProject.dll
The output begins like this
Working Directory:
Assemblies:
Coverage Xml: C:.hudson\jobs\Project\workspace\src\coverage.xml
Coverage Log: Coverage.Log
Waiting for profiled application to connect...Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
and after the MSTest output
Test Run Failed.
Passed 8
Failed 2
Inconclusive 2
Total 103
Results file: C:.hudson\jobs\Project\workspace\src\debug.trx
Test Settings: Local
Connected
Profiled process terminated. Profiler connection not established.
How to fix that?
Can you post the console output to your message? That'd tell if the session completed successfully. It could be that the coverage xml isn't showing because it's going to a directory other than the one you think it should. It's default is the current command prompt directory.
Also, you may want to try using the latest edition of NCover, v.3.4.16. You can get a 21-day trial for free at www.ncover.com/download.

What causes ClickOnce URLDownloadToCacheFile failed during installation?

I'm getting the following error when installing my ClickOnce application via firefox. It doesn't happen with IE on the same computer. I swear I've installed it via firefox before. This is a Windows 7 machine.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [ProcessorArchitecture] = Intel {string}
Property: [VersionNT] = 6.1.0 {version}
Running checks for package '.NET Framework 2.0 (x86)', phase BuildList
Running external check with command 'C:\Users\luke\AppData\Local\Temp\VSDEF1A.tmp\DotNetFX\dotnetchk.exe' and parameters ''
Process exited with code 1
Setting value '1 {int}' for property 'DotNetInstalled'
Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet Explorer'
Read string value '8.0.7600.16385'
Setting value '8.0.7600.16385 {string}' for property 'IEVersion'
The following properties have been set for package '.NET Framework 2.0 (x86)':
Property: [DotNetInstalled] = 1 {int}
Property: [IEVersion] = 8.0.7600.16385 {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'
'.NET Framework 2.0 (x86)' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697211'
Error: An error occurred trying to download 'http://croppy.lukehunter.net/download/croppy.application'.
The following is the howto from Microsoft, but this doesn't apply to firefox. There is no redirection happening either.
If a user has set Internet Explorer
Advanced Security option "Warn if
changing between secure and not secure
mode" on the deployment target
computer, and if the setup URL of the
ClickOnce application being installed
is redirected from a non-secure to a
secure site (or vice-versa), the
installation will fail because the
Internet Explorer warning interrupts
it.
Internet Explorer calls either LaunchApplication or ShOpenVerbApplication procedure from dfshim.dll behind the scenes, whereas Firefox plug-in (as well as a standard bootstrapper created by Visual Studio 2008-2010, which could also produce this rare error) uses a different, out of date technique to launch ClickOnce applications. (Note, that LaunchApplication requires at least .NET Framework 2 SP 2.)
To avoid such error one could redirect Internet Explorer to a deployment manifest (.application) and all other browsers to a custom installer (.exe) that would install .NET Framework if necessary and then call ShOpenVerbApplication.
Hmm, after using IE to install, then uninstalling, I was able to install via firefox again. Odd.
The following worked for me:
Within the local distribution package CLICK ONCE a web.config file was generated on line clientCache that was the problem, in which altered as follows for CHROME and IE8 and now run the file:
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
I've had this and it to resolve it was to disable the firewall. I sadly don't know what Firewall settings it was, I just disabled the lot and it ran/installed without issue.
After exhausting firewall options on this issue, I found that my excutable was pointing to the IP Address of the Application Server. When I changed the site deployment and consequently the executable to the FQDN of the server instead of the IP Address, the installer worked first time.
Simple Solution, on cmd execute setup.exe /URL=http://< Production  URL>/
Easy!

Resources