Installing Net Framework 4 Remotely as an Administrator

3

I am trying to install the .net framework 4.0 remotely using the following commands

1

command => 'Powershell.exe -Verb RunAs -FilePath C:\Temp\dotNetFx40_Full_setup.exe -ArgumentList "/q /norestart /log C:\Temp\NetFx40.htm"'

2

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).
.net
powershell
.net-4.0
puppet
asked on Stack Overflow Jan 14, 2013 by Maverick • edited Jun 20, 2020 by Community

4 Answers

1

It won't work and you're not the only one bitten by this!

Read this Microsoft support article for a complete description:

Windows Update Standalone Installer (WUSA) returns 0x5 ERROR_ACCESS_DENIED when deploying .msu files through WinRM and Windows Remote Shell

The workaround is to run the installer out-of-band from the WinRM/WinRS session.

answered on Stack Overflow Mar 19, 2014 by Ringo
0

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
answered on Stack Overflow Apr 28, 2016 by Ajit Medhekar
0

This is possible by using PSEXEC from SysInternals.

psexec.exe \\SERVERNAME /s \\networkshare\setup\ndp48-x86-x64-allos-enu.exe /passive /norestart /SkipMSUInstall

answered on Stack Overflow Aug 31, 2019 by Shiroy
-1

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}
answered on Stack Overflow Sep 23, 2015 by Clinton • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0