Visual Studio 2017 installation fails with package install error - visual-studio

I am attempting to install visual studio 2017.
I get an error after the installation "Setup Operation Failed"
Below is the install output log.
The log reports this step failed:
Package 'Microsoft.VisualStudio.WebDeploy.Msi,version=15.0.26430.16,chip=x64' failed to install.
Log:
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26323.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26412.1)
Incomplete components
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26323.1)
Web Deploy (Microsoft.VisualStudio.Component.WebDeploy,version=15.0.26208.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26208.0)
You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine.
Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds.
Package 'Microsoft.VisualStudio.WebDeploy.Msi,version=15.0.26430.16,chip=x64' failed to install.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.WebDeploy.Msi;PackageAction=Install;ReturnCode=1720
Impacted workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26323.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26412.1)
Impacted components
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26323.1)
Web Deploy (Microsoft.VisualStudio.Component.WebDeploy,version=15.0.26208.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26208.0)
Log
C:\Users\jawierzb\AppData\Local\Temp\2\dd_setup_20170731130217_255_Microsoft.VisualStudio.WebDeploy.Msi.log
Details
MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.WebDeploy.Msi,version=15.0.26430.16,chip=x64\webdeploy_x64.msi, Properties: REBOOT=ReallySuppress
Return code: 1720
Return code details: There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor.
It references a detail log file which is too large to fit here but I am scanning it trying to find anything relevant.

The root cause of this issue turned out to be a windows problem. The WMI repository was corrupted. I re-installed windows and the install succeeded.

Related

VS2017 installation keeps failing with error as couldn't install Microsoft.Net.4.5.2.TargetingPack

I am trying to install VS2019 and reinstalled it number of times but every time the setup stops in between with a message Setup completed with warning .Net framework 4.5.2 targeting pack didn't install.
In the logs I can see
PackageId:Microsoft.Net.4.5.2.TargetingPack;PackageAction:Install;ReturnCode:1625;
At this stage I'm able to open the VS 2017 but without web template.
Error details :
Package 'Microsoft.Net.4.5.2.TargetingPack,version=4.5.51651.1' failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.Net.4.5.2.TargetingPack;PackageAction=Install;ReturnCode=1625
Details
MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Net.4.5.2.TargetingPack,version=4.5.51651.1\netfx_452mtpack.msi, Properties: REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1 MSIFASTINSTALL="7" EXTUI="1"
Return code: 1625
Return code details: This installation is forbidden by system policy. Contact your system administrator.
Log
C:\Users\ihalarnkar162161\AppData\Local\Temp\dd_setup_20200417231054_219_Microsoft.Net.4.5.2.TargetingPack.log
Impacted workloads
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.8.27906.1)
Impacted components
.NET Framework 4 – 4.6 development tools (Microsoft.Net.ComponentGroup.TargetingPacks.Common,version=15.6.27406.0)
.NET Framework 4.5.2 targeting pack (Microsoft.Net.Component.4.5.2.TargetingPack,version=15.6.27406.0)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.8.27825.0)
ASP.NET and web development tools prerequisites (Microsoft.VisualStudio.ComponentGroup.Web,version=15.9.28219.51)
Cloud tools for web development (Microsoft.VisualStudio.ComponentGroup.Web.CloudTools,version=15.8.27729.1)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26621.2)
Microsoft Azure WebJobs Tools (Component.Microsoft.VisualStudio.Web.AzureFunctions,version=15.7.27617.1)
Microsoft Azure WebJobs Tools (Microsoft.VisualStudio.ComponentGroup.AzureFunctions,version=15.7.27617.1)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.9.28107.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.8.27924.0)
Error 1625 indicates:
ERROR_INSTALL_PACKAGE_REJECTED 1625 This installation is forbidden by
system policy. Contact your system administrator.
According to https://learn.microsoft.com/en-us/windows/win32/msi/error-codes
My educated guess here will be to run vsinstaller with admin privileges (run as admin), it should fix the issue.
Let me know if that sort things out

Cannot install Microsoft.VisualStudio.Community.Msi

I have downloaded visual studio 2017 15.7.6 with these following workloads
.Net desktop development.
ASP.NET and web development.
Mobile development with .Net
After installing everything I get this warning "setup complete with warning" and then i clicked "View problem". The problem then shows "Cannot install Microsoft.Visualstudio.Community.Msi".
This is the full error log,
Something went wrong with the install.
You can troubleshoot the package failures by:
Search for solutions using the search URL below for each package failure
Modify your selections for the affected workloads or components and then retry the installation
Remove the product from your machine and then install again
If the issue has already been reported on the Developer Community, you can find solutions or workarounds there. If the issue has not been reported, we encourage you to create a new issue so that other developers will be able to find solutions or workarounds. You can create a new issue from within the Visual Studio Installer in the upper-right hand corner using the "Provide feedback" button.
================================================================================
Package 'Microsoft.VisualStudio.Community.Msi,version=15.7.27617.1' failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.Community.Msi;PackageAction=Install;ReturnCode=1406
Details
MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Community.Msi,version=15.7.27617.1\Microsoft.VisualStudio.Community.Msi.msi, Properties: REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1 MSIFASTINSTALL="7" VSEXTUI="1" PIDKEY="NGKBDRWKQFTT82MTRMPKRM6XM" VS7.3643236F_FC70_11D3_A536_0090278A1BB8="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" FEEDBACKOPTIN="1"
Return code: 1603
Return code details: Fatal error during installation.
Message Id: 1406
Message Details: Could not write value PrimaryInteropAssemblyName to key \Software\Classes\TypeLib{7C0FFAB0-CD84-11D0-949A-00A0C91110ED}\1.0. Verify that you have sufficient access to that key, or contact your support personnel.
Log
C:\Users\MysterHyde\AppData\Local\Temp\dd_setup_20200309103712_053_Microsoft.VisualStudio.Community.Msi.log
Impacted workloads
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.7.27625.0)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.7.27625.0)
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.7.27625.0)
Impacted components
.NET Core 2.0 development tools (Microsoft.NetCore.ComponentGroup.DevelopmentTools,version=15.7.27617.1)
.NET Core 2.0 development tools (Microsoft.NetCore.ComponentGroup.Web,version=15.7.27625.0)
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.7.27625.0)
.NET Framework 4.6.1 development tools (Microsoft.Net.ComponentGroup.DevelopmentPrerequisites,version=15.7.27520.0)
.NET Portable Library targeting pack (Microsoft.VisualStudio.Component.PortableLibrary,version=15.6.27309.0)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.7.27520.0)
ASP.NET and web development tools prerequisites (Microsoft.VisualStudio.ComponentGroup.Web,version=15.7.27625.0)
Blend for Visual Studio (Microsoft.ComponentGroup.Blend,version=15.6.27406.0)
C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.27205.0)
ClickOnce Publishing (Microsoft.Component.ClickOnce,version=15.7.27520.0)
Cloud Explorer (Microsoft.VisualStudio.Component.CloudExplorer,version=15.7.27520.0)
Cloud tools for web development (Microsoft.VisualStudio.ComponentGroup.Web.CloudTools,version=15.7.27520.0)
Connectivity and publishing tools (Microsoft.VisualStudio.Component.Common.Azure.Tools,version=1.10.50912.1)
Data sources and service references (Microsoft.VisualStudio.Component.VisualStudioData,version=15.6.27406.0)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26621.2)
Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.7.27617.1)
Entity Framework 6 tools (Microsoft.VisualStudio.Component.EntityFramework,version=15.6.27406.0)
F# language support (Microsoft.VisualStudio.Component.FSharp,version=15.7.27604.0)
F# language support for web projects (Microsoft.VisualStudio.Component.FSharp.WebTemplates,version=15.7.27703.1)
IIS Express (Microsoft.VisualStudio.Component.IISExpress,version=15.0.26208.0)
JavaScript and TypeScript language support (Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.7.27520.0)
JavaScript diagnostics (Microsoft.VisualStudio.Component.JavaScript.Diagnostics,version=15.7.27520.0)
Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.6.27323.2)
Microsoft Azure WebJobs Tools (Component.Microsoft.VisualStudio.Web.AzureFunctions,version=15.7.27617.1)
Microsoft Azure WebJobs Tools (Microsoft.VisualStudio.ComponentGroup.AzureFunctions,version=15.7.27617.1)
NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.6.27309.0)
Razor Language Services (Component.Microsoft.VisualStudio.RazorExtension,version=15.0.26720.2)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.7.27625.0)
Web Deploy (Microsoft.VisualStudio.Component.WebDeploy,version=15.0.26208.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.7.27604.0)
Xamarin (Component.Xamarin,version=15.7.27617.1)
Xamarin Workbooks (Component.Xamarin.Inspector,version=15.0.26606.0)>
I tried downloading other version but i'm still getting the same error. I disabled my antivirus but it also didn't work. Please I need help it frustrating, what am i doing wrong?
I disabled my antivirus but it also didn't work. Please I need help it
frustrating, what am i doing wrong?
Please try these steps:
1) Launch regedit as Administrators
2) Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{7C0FFAB0-CD84-11D0-949A-00A0C91110ED}\1.0-->Right click-->launch Permissions -> Advanced
Ensure the Owner is SYSTEM
System and Administrator have Full Control to keys and subkeys.
Meanwhile, please check if you have specialized anti-virus, app-blocker, or GPO phased permission software installed that maybe be denying access to this key.
3) then do a reboot and after that, try to temporarily disable the anti-virus software and then run VS Installer as administrator to repair your installation.
In addition, if these does not work, please reinstall VS2017(please install the VS2017 15.9 which is the latest VS2017 version) under this link.
After you uninstall VS2017, please check if you have this: %programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe.
If so, please launch it from an admin command prompt with a -full param: InstallCleanup.exe -full
If not, please manually delete the %programfiles(x86)%\Microsoft Visual Studio\Installer folder
And then insatll VS2017 under my link and please remember to run it as admin.
Hope it could help you.

Couldn't Install Microsoft.Nuget.VisualStudio.Core ReturnCode 1603

I've been having some trouble with the latest version of the vs2017 Community Installer installing Visual Studio.
Package 'Microsoft.VisualStudio.NuGet.Core,version=15.0.40902.5706' failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.NuGet.Core;PackageAction=Install;ReturnCode=1603
Details
Return code: 1603
Return code details: Fatal error during installation.
Log
C:\Users\myuseraccount\AppData\Local\Temp\dd_setup_20190110143209_001_Microsoft.VisualStudio.NuGet.Core.log
Impacted workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.8.27906.1)
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.8.27906.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.8.27906.1)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.8.27906.1)
Data storage and processing (Microsoft.VisualStudio.Workload.Data,version=15.6.27309.0)
Desktop development with C++ (Microsoft.VisualStudio.Workload.NativeDesktop,version=15.9.28307.102)
Game development with Unity (Microsoft.VisualStudio.Workload.ManagedGame,version=15.0.27005.2)
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.9.28107.0)
Mobile development with JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.7.27625.0)
Node.js development (Microsoft.VisualStudio.Workload.Node,version=15.9.28107.0)
Office/SharePoint development (Microsoft.VisualStudio.Workload.Office,version=15.8.27924.0)
Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.9.28307.102)
Impacted components
.NET Core 2.0 development tools (Microsoft.NetCore.ComponentGroup.DevelopmentTools,version=15.8.27729.1)
.NET Core 2.1 development tools (Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1,version=15.8.27924.0)
.NET Core 2.1 development tools (Microsoft.NetCore.ComponentGroup.Web.2.1,version=15.8.27924.0)
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.7.27625.0)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.8.27825.0)
ASP.NET and web development tools prerequisites (Microsoft.VisualStudio.ComponentGroup.Web,version=15.9.28219.51)
Azure Cloud Services core tools (Microsoft.VisualStudio.Component.Azure.Waverton,version=15.9.28107.0)
Azure Cloud Services tools (Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices,version=15.0.26504.0)
Azure Data Lake and Stream Analytics Tools (Microsoft.Component.Azure.DataLake.Tools,version=15.9.28107.0)
Azure development prerequisites (Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites,version=15.9.28107.0)
Azure Resource Manager core tools (Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools,version=15.9.28107.0)
Azure Resource Manager tools (Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools,version=15.0.27005.2)
Cloud tools for web development (Microsoft.VisualStudio.ComponentGroup.Web.CloudTools,version=15.8.27729.1)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26621.2)
Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.8.27825.0)
F# language support (Microsoft.VisualStudio.Component.FSharp,version=15.8.27825.0)
F# language support for web projects (Microsoft.VisualStudio.Component.FSharp.WebTemplates,version=15.8.27705.0)
Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.8.27729.1)
Microsoft Azure WebJobs Tools (Component.Microsoft.VisualStudio.Web.AzureFunctions,version=15.7.27617.1)
Microsoft Azure WebJobs Tools (Microsoft.VisualStudio.ComponentGroup.AzureFunctions,version=15.7.27617.1)
Mobile development with JavaScript core features (Microsoft.VisualStudio.Component.Cordova,version=15.0.26606.0)
Node.js development support (Microsoft.VisualStudio.Component.Node.Tools,version=15.8.27825.0)
NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.9.28016.0)
Office Developer Tools for Visual Studio (Microsoft.VisualStudio.Component.Sharepoint.Tools,version=15.8.27924.0)
Redgate SQL Search (Component.Redgate.SQLSearch.VSExtension,version=3.1.7.2062)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.9.28107.0)
Test Adapter for Google Test (Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest,version=15.8.27906.1)
Testing tools core features (Microsoft.VisualStudio.Component.TestTools.Core,version=15.7.27520.0)
Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.9.28119.51)
Universal Windows Platform tools for Cordova (Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.9.28307.102)
Universal Windows Platform tools for Xamarin (Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.9.28307.102)
Visual Studio Tools for Office (VSTO) (Microsoft.VisualStudio.Component.TeamOffice,version=15.7.27625.0)
Visual Studio Tools for Unity (Microsoft.VisualStudio.Component.Unity,version=15.7.27617.1)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.8.27924.0)
Windows Workflow Foundation (Microsoft.VisualStudio.Component.Workflow,version=15.8.27825.0)
Xamarin (Component.Xamarin,version=15.8.27906.1)
I'm not really sure why this is happening. I've tried doing a clean install of Windows - didn't work; I've tried going to the URL here from MSFT and I get 0 results from the search.
The end result on opening VS is that Visual Studio has little to no tooling available for creating new ASP.NET projects, C# desktop projects, etc.
Here is the log file dump:
[19ac:0030][2019-01-10T14:36:03] Opening the package for processing
[19ac:0030][2019-01-10T14:36:03] Using package payload to get the embedded manifest
[19ac:0030][2019-01-10T14:36:03] Error 0x80131509: Error processing vsix manifest: System.InvalidOperationException: Specified part does not exist in the package.
at System.IO.Packaging.Package.GetPart(Uri partUri)
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackageFromPayload(Package package, ILogger logger)
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackage(IPackageIdentity vsix, Package package, ExecuteAction action, ILogger logger, Boolean isManifestCached)
at System.IO.Packaging.Package.GetPart(Uri partUri)
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackageFromPayload(Package package, ILogger logger)
at Microsoft.VisualStudio.Setup.Installer.VsixInstaller.GetEmbeddedVsixPackage(IPackageIdentity vsix, Package package, ExecuteAction action, ILogger logger, Boolean isManifestCached)
Couldn't Install Microsoft.Nuget.VisualStudio.Core ReturnCode 1603
According to the error log, the issue should be that Visual Studio does not properly install the NuGet extension package. To resolve this issue, you should open the installer to reinstall the NuGet extension.
Modify the installer.
Switch to Individual components.
Under the code tools, uncheck the NuGet package manager.
Close the Installer, then re-open it, recheck the NuGet package manager.
If it not helps, or you can not modify the installer, please try to repair or re-install the Visual Studio to resolve this issue.
Hope this helps.
TLDR; Visual Studio creates a Packages folder under your hidden C:\ProgramData\Microsoft\VisualStudio directory. After reviewing the error logs, I discovered that the package for NuGet somehow got corrupted. Try deleting your packages folder and seeing if that clears up your installation; otherwise, just follow everything above.
After a lot of time working on this, here's what actually fixed the problem.
C:\ProgramData\Microsoft\VisualStudio - Delete the Packages folder here.
C:\Program Files (x86)\Microsoft Visual Studio - Delete the folders 2017, Installer, and Shared. Basically everything underneath the VS 2017 Install directory.
Re-run the installer for VS 2017.
NuGet.Core should be installed this time.
I installed my Visual Studio from a Layout (offline installation)- details on how to do that here. I would recommend creating a layout file (basically an ISO) so that you don't run into issues like I did above.
--For issues with the the current preview version
I was also getting errors with the Visual Studio 2019 preview version. What I did to fix that was create a layout (offline installer) of the 2019 version and deleted the package that was breaking my installation from my ProgramData subdirectory (C:\ProgramData\Microsoft\VisualStudio). I then ran the installer with the option --noWeb and it worked. Thanks Microsoft for giving us the ability to create layouts!!!!

Cannot install Visual Studio 2017 due to Microsoft.VisualStudio.Setup.Configuration package install failure

I cannot install the above mentioned package, which is requied to proceed the Visual Studio install. I checked on Microsoft's forums for solution but no luck.
I unchecked read-only checkbox in the root of the directory, also manually recreated x64 and x86 folders. The permissions on the users are as they should be also the cleaner app didn't help. I am using the 1809 Windows edition. The current VS version is 15.9.4.
The log is the following:
Something went wrong with the install.
You can troubleshoot the package failures by:
1. Search for solutions using the search URL below for each package failure
2. Modify your selections for the affected workloads or components and then retry the installation
3. Remove the product from your machine and then install again
If the issue has already been reported on the Developer Community, you can find solutions or workarounds there. If the issue has not been reported, we encourage you to create a new issue so that other developers will be able to find solutions or workarounds. You can create a new issue from within the Visual Studio Installer in the upper-right hand corner using the "Provide feedback" button.
================================================================================
Package 'Microsoft.VisualStudio.Setup.Configuration,version=1.18.21.37008' failed to install.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.Setup.Configuration;PackageAction=Install;ReturnCode=1317
Details
MSI: C:\TempTmp\Nova mapa\Microsoft.VisualStudio.Setup.Configuration,version=1.18.21.37008\Microsoft.VisualStudio.Setup.Configuration.msi, Properties: REBOOT=ReallySuppress ARPSYSTEMCOMPONENT=1 ALLUSERS="1" MSIFASTINSTALL="7" 
Return code: 1603
Return code details: Fatal error during installation.
Message Id: 1317
Message Details: An error occurred while attempting to create the directory: C:\ProgramData\Microsoft\VisualStudio\Setup
Log
C:\TempTmp\dd_setup_20181215215511_001_Microsoft.VisualStudio.Setup.Configuration.log
Impacted workloads
Game development with Unity (Microsoft.VisualStudio.Workload.ManagedGame,version=15.0.27005.2)
Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.9.28307.102)
Visual Studio core editor (Microsoft.VisualStudio.Workload.CoreEditor,version=15.0.27205.0)
Impacted components
.NET Native (Microsoft.Component.NetFX.Native,version=15.0.26208.0)
.NET Native and .NET Standard (Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard,version=15.8.27906.1)
.NET Portable Library targeting pack (Microsoft.VisualStudio.Component.PortableLibrary,version=15.6.27309.0)
.NET profiling tools (Microsoft.VisualStudio.Component.DiagnosticTools,version=15.8.27729.1)
ASP.NET and web development (Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions,version=15.8.27825.0)
Blend for Visual Studio (Microsoft.ComponentGroup.Blend,version=15.6.27406.0)
C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.8.27729.1)
ClickOnce Publishing (Microsoft.Component.ClickOnce,version=15.8.27825.0)
Data sources and service references (Microsoft.VisualStudio.Component.VisualStudioData,version=15.6.27406.0)
Developer Analytics tools (Microsoft.VisualStudio.Component.AppInsights.Tools,version=15.8.27825.0)
Image and 3D model editors (Microsoft.VisualStudio.Component.Graphics,version=15.6.27406.0)
JavaScript and TypeScript language support (Microsoft.VisualStudio.Component.JavaScript.TypeScript,version=15.9.28125.51)
JavaScript diagnostics (Microsoft.VisualStudio.Component.JavaScript.Diagnostics,version=15.8.27729.1)
NuGet package manager (Microsoft.VisualStudio.Component.NuGet,version=15.9.28016.0)
Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.9.28119.51)
Universal Windows Platform tools for Cordova (Microsoft.VisualStudio.ComponentGroup.UWP.Cordova,version=15.9.28307.102)
Universal Windows Platform tools for Xamarin (Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.9.28307.102)
Visual Studio core editor (Microsoft.VisualStudio.Component.CoreEditor,version=15.8.27729.1)
Visual Studio Tools for Unity (Microsoft.VisualStudio.Component.Unity,version=15.7.27617.1)
WebSocket4Net (Component.WebSocket,version=15.0.26606.0)
Update 1.1.2019
I contacted the Microsoft support over chat, but didn't get any further. I was told to try to install an earlier release. I ended up formatting my SSD and installing all the software all over. It luckily succeeded. I am providing a vslogs overview of the error, before the format.

Offline installation of Visual Studio 2017 Update 2 (26430.04) fails

I'm running the command mu_visual_studio_enterprise_2017_x86_x64_10049783.exe --layout c:\vs2017offline --lang en-US to create an offline Visual Studio 2017 installer with the latest update 15.2 (26430.04). I have followed the instructions for offline installation and imported the certs etc. Still, on a machine without internet connection the installation fails. This has caused me major headaches as the failed installation corrupted my dev machine. Installation log attached below:
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26323.1)
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26412.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26412.1)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26412.1)
Data storage and processing (Microsoft.VisualStudio.Workload.Data,version=15.0.26208.0)
Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Incomplete components
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26323.1)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26323.1)
Azure Cloud Services core tools (Microsoft.VisualStudio.Component.Azure.Waverton,version=15.0.26208.0)
Azure Cloud Services tools (Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices,version=15.0.26208.0)
Azure Data Lake Tools (Microsoft.Component.Azure.DataLake.Tools,version=15.0.26208.0)
Azure development prerequisites (Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites,version=15.0.26323.1)
Azure Resource Manager core tools (Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools,version=15.0.26208.0)
Azure Resource Manager tools (Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools,version=15.0.26323.1)
C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26208.0)
Live Unit Testing (Microsoft.VisualStudio.Component.LiveUnitTesting,version=15.0.26208.0)
Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.0.26419.1)
Microsoft Test Manager (Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager,version=15.0.26228.0)
OzCode (Component.6c84f75d-38c3-48a2-9e54-d362238686b5,version=3.0.0.3597)
PowerShell Tools for Visual Studio 2017 (Component.PowerShellTools.VS2017,version=3.0.539)
ReadyRoll for VS2017 (Component.Redgate.ReadyRoll,version=1.13.23.3401)
SQL Prompt Core (Component.Redgate.SQLPrompt.VsPackage,version=7.5.1.1087)
SQL Search (Component.Redgate.SQLSearch.VSExtension,version=2.4.2.1321)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.0.26208.0)
Testing tools core features (Microsoft.VisualStudio.Component.TestTools.Core,version=15.0.26208.0)
Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26412.1)
Universal Windows Platform tools for Xamarin (Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
Web performance and load testing tools (Microsoft.VisualStudio.Component.TestTools.WebLoadTest,version=15.0.26208.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26208.0)
Windows Workflow Foundation (Microsoft.VisualStudio.Component.Workflow,version=15.0.26208.0)
You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine.
Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds.
Package 'Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources,version=15.0.26412.1,language=en-US' failed to download from 'https://download.microsoft.com/download/1/9/A/19A9B545-B70C-4B0E-871D-CEF22A55E2A8/microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix'.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources;PackageAction=DownloadPackage;ReturnCode=0x80072ee7
Impacted workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26323.1)
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26412.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26412.1)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26412.1)
Data storage and processing (Microsoft.VisualStudio.Workload.Data,version=15.0.26208.0)
Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Impacted components
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26323.1)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26323.1)
Azure Cloud Services core tools (Microsoft.VisualStudio.Component.Azure.Waverton,version=15.0.26208.0)
Azure Cloud Services tools (Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices,version=15.0.26208.0)
Azure Data Lake Tools (Microsoft.Component.Azure.DataLake.Tools,version=15.0.26208.0)
Azure Resource Manager core tools (Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools,version=15.0.26208.0)
Azure Resource Manager tools (Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools,version=15.0.26323.1)
C# and Visual Basic (Microsoft.VisualStudio.Component.Roslyn.LanguageServices,version=15.0.26208.0)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26208.0)
Live Unit Testing (Microsoft.VisualStudio.Component.LiveUnitTesting,version=15.0.26208.0)
Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.0.26419.1)
OzCode (Component.6c84f75d-38c3-48a2-9e54-d362238686b5,version=3.0.0.3597)
PowerShell Tools for Visual Studio 2017 (Component.PowerShellTools.VS2017,version=3.0.539)
ReadyRoll for VS2017 (Component.Redgate.ReadyRoll,version=1.13.23.3401)
SQL Prompt Core (Component.Redgate.SQLPrompt.VsPackage,version=7.5.1.1087)
SQL Search (Component.Redgate.SQLSearch.VSExtension,version=2.4.2.1321)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.0.26208.0)
Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26412.1)
Web performance and load testing tools (Microsoft.VisualStudio.Component.TestTools.WebLoadTest,version=15.0.26208.0)
Windows Communication Foundation (Microsoft.VisualStudio.Component.Wcf.Tooling,version=15.0.26208.0)
Windows Workflow Foundation (Microsoft.VisualStudio.Component.Workflow,version=15.0.26208.0)
Details
WebClient download failed: The remote name could not be resolved: 'download.microsoft.com'
Bits download failed: File not found.
WinInet download failed: Function: InternetOpenUrl, HR: -2147012889, Message: Unknown error 12007
Package 'Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources,version=15.0.26424.2,language=en-US' failed to download from 'https://download.microsoft.com/download/D/3/0/D3037781-3854-46BA-B6BC-7744B2A41FF1/microsoft.visualstudio.testtools.testplatform.legacy.core.resources.vsix'.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.TestTools.TestPlatform.Legacy.Core.Resources;PackageAction=DownloadPackage;ReturnCode=0x80072ee7
Impacted workloads
.NET Core cross-platform development (Microsoft.VisualStudio.Workload.NetCoreTools,version=15.0.26323.1)
.NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop,version=15.0.26412.1)
ASP.NET and web development (Microsoft.VisualStudio.Workload.NetWeb,version=15.0.26412.1)
Azure development (Microsoft.VisualStudio.Workload.Azure,version=15.0.26412.1)
Data storage and processing (Microsoft.VisualStudio.Workload.Data,version=15.0.26208.0)
Universal Windows Platform development (Microsoft.VisualStudio.Workload.Universal,version=15.0.26403.0)
Impacted components
.NET desktop development tools (Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites,version=15.0.26323.1)
ASP.NET and web development tools (Microsoft.VisualStudio.Component.Web,version=15.0.26323.1)
Azure Cloud Services core tools (Microsoft.VisualStudio.Component.Azure.Waverton,version=15.0.26208.0)
Azure Cloud Services tools (Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices,version=15.0.26208.0)
Azure Data Lake Tools (Microsoft.Component.Azure.DataLake.Tools,version=15.0.26208.0)
Azure development prerequisites (Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites,version=15.0.26323.1)
Azure Resource Manager core tools (Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools,version=15.0.26208.0)
Azure Resource Manager tools (Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools,version=15.0.26323.1)
Data sources for SQL Server support (Microsoft.VisualStudio.Component.SQL.DataSources,version=15.0.26208.0)
Managed Desktop Workload Core (Microsoft.VisualStudio.Component.ManagedDesktop.Core,version=15.0.26419.1)
Microsoft Test Manager (Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager,version=15.0.26228.0)
PowerShell Tools for Visual Studio 2017 (Component.PowerShellTools.VS2017,version=3.0.539)
ReadyRoll for VS2017 (Component.Redgate.ReadyRoll,version=1.13.23.3401)
SQL Prompt Core (Component.Redgate.SQLPrompt.VsPackage,version=7.5.1.1087)
SQL Search (Component.Redgate.SQLSearch.VSExtension,version=2.4.2.1321)
SQL Server Data Tools (Microsoft.VisualStudio.Component.SQL.SSDT,version=15.0.26208.0)
Testing tools core features (Microsoft.VisualStudio.Component.TestTools.Core,version=15.0.26208.0)
Universal Windows Platform tools (Microsoft.VisualStudio.Component.UWP.Support,version=15.0.26412.1)
Universal Windows Platform tools for Xamarin (Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin,version=15.0.26403.0)
Web performance and load testing tools (Microsoft.VisualStudio.Component.TestTools.WebLoadTest,version=15.0.26208.0)
Windows Workflow Foundation (Microsoft.VisualStudio.Component.Workflow,version=15.0.26208.0)
Details
WebClient download failed: The remote name could not be resolved: 'download.microsoft.com'
Bits download failed: File not found.
WinInet download failed: Function: InternetOpenUrl, HR: -2147012889, Message: Unknown error 12007
Package 'Microsoft.VisualStudio.TestTools.TestManagement.MicrosoftTestManager.Resources,version=15.0.26424.2,language=en-US' failed to download from 'https://download.microsoft.com/download/6/3/5/635106B1-58AD-4D74-B069-9942F0654B95/MS.VS.TestTools.TestManagement.MSTestManager.Resources.vsix'.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=Microsoft.VisualStudio.TestTools.TestManagement.MicrosoftTestManager.Resources;PackageAction=DownloadPackage;ReturnCode=0x80072ee7
Impacted components
Microsoft Test Manager (Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager,version=15.0.26228.0)
Details
WebClient download failed: The remote name could not be resolved: 'download.microsoft.com'
Bits download failed: File not found.
WinInet download failed: Function: InternetOpenUrl, HR: -2147012889, Message: Unknown error 12007
It seems you didn't include the --includeRecommended and --includeOptional parameters in your offline layout command, this is required because it only downloads required packages by default which is not sufficient for the installation to work offline.
The problem is: The --layout switch should be used ONLY when downloading a new workload or updating one, which off-course need to be done online, which makes the above error.
By just saying --layout you ask setup: "please update the components in this layout, I'm online now.", which 1st downlaod ~ 60MB file saying "Give us more time, we'll be done soon", then start updating.
When you want to setup vs2017:
Open the 3 certificates in [layoutFolder]\certificates, press enter
or next on each dialog till you finish, don't change anything.
Run [layoutFolder]\vs_*.exe.
However, Its highly recommended to automate the run of vs_*.exe (for setup to choose the exactly Required components) like that:
.\layout\vs_setup.exe --add microsoft.visualstudio.workload.ManagedDesktop --nocache
You don't need to even specify: --lang en-US. --nocache will save your C: from same-as-installed-workload-size additional GB's.
You can do manual download https://download.microsoft.com/download/1/9/A/19A9B545-B70C-4B0E-871D-CEF22A55E2A8/microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix and put it to folder "Microsoft.CodeAnalysis.VisualStudio.InteractiveComponents.Resources,version=15.0.26412.1,language=en-US" , file name must be "microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix"

Resources