I am trying to install the .net framework 4.0 remotely using the following commands
command => 'Powershell.exe -Verb RunAs -FilePath C:\Temp\dotNetFx40_Full_setup.exe -ArgumentList "/q /norestart /log C:\Temp\NetFx40.htm"'
command => 'C:\Windows\System32\cmd.exe /c C:\Temp\dotNetFx40_Full_setup.exe /q /norestart /log C:\Temp\NetFx40.htm',
With both i get the following in the logs. Btw the user running the command is a member of the Local Administrators Group.
Final Result: Installation failed with error code: (0x00000005), "Access is denied. " (Elapsed time: 0 00:00:55).
OS Version = 6.1.7601, Platform 2, Service Pack 1
OS Description = Win2K8R2 - x64 Standard Edition Service Pack 1
CommandLine = D:\ecfcf956d61e2bf89c1c75ce16\\Setup.exe /q /norestart /log C:\Temp\NetFx40.htm /x86 /x64 /ia64 /web
TimeZone = Eastern Standard Time
Initial LCID = 1033
Using Simultaneous Download and Install mechanism
Operation: Installing
Package Name = Microsoft .NET Framework 4 Setup
Package Version = 4.0.30319
User Experience Data Collection Policy: Disabled
Number of applicable items: 11
Exe (D:\ecfcf956d61e2bf89c1c75ce16\SetupUtility.exe) succeeded.
Exe Log File: dd_SetupUtility.txt
ServiceControl operation succeeded!
ServiceControl operation succeeded!
Exe (C:\Users\_BUILD~1\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x64.msu) failed with 0x5 - Access is denied. .
Final Result: Installation failed with error code: (0x00000005), "Access is denied. " (Elapsed time: 0 00:00:21).
It won't work and you're not the only one bitten by this!
Read this Microsoft support article for a complete description:
The workaround is to run the installer out-of-band from the WinRM/WinRS session.
While installation of .NET framework 4.0, It installs some updates as well (.msu) files.
But when we are installaing .NET 4.0 remotely, It fails because of these updates. The reason behind that is, it's not allowable to install these updates remotely. Please find the KB article enter link description here. This article also mentioned the workaround for this.
We can skip this updates & we can only installs .NET framework 4.0 using following arguments :
dotnetfx40_Full_x86_x64.exe /norestart /SkipMSUInstall
This is possible by using PSEXEC from SysInternals.
psexec.exe \\SERVERNAME /s \\networkshare\setup\ndp48-x86-x64-allos-enu.exe /passive /norestart /SkipMSUInstall
I was getting this same error as I attempted to remotely install .Net 4.0. To resolve it I used the below command, per How can I remotely, programmatically install .NET 4 client on an Azure VM? :
Invoke-Command -session $CompSession -scriptBlock {
Start-Process -FilePath "C:\dotnetfx40_Full_x86_x64.exe" `
-ArgumentList " /passive /norestart /SkipMSUInstall /log "C:\results.log" -PassThru | Wait-Process}
User contributions licensed under CC BY-SA 3.0