What is the best way to install .net Runtime v8.0 via Intune?

Woodson Baldwin 0 Reputation points
2024-05-15T22:58:19.7133333+00:00

What is the current best way to install .net Runtime v8.0 via Intune to a large number of users? The .net website offers an .exe file but it doesn't contain an .msi I can turn into an Intune app. There are also winget instructions listed but winget doesn't work in a system context so any scripts I package as a Win32 app fail.

I've googled the subject and found some scripts people have found to work around the problem but the one's I've tried have failed (they sit in "installing" status for hours). Is there an option somewhere I've missed?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,153 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,992 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Crystal-MSFT 48,081 Reputation points Microsoft Vendor
    2024-05-16T03:08:26.48+00:00

    @Woodson Baldwin, Thanks for posting in Q&A. Based on my researching, I find the sdk file has silent install command. But it will install three different .NET runtimes which mentioned in the following link:

    dotnet-sdk-8.0.100-win-x64.exe /install /quiet /norestart

    https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net80

    We can warp the sdk to .intunewin and deploy via Win32 app.

    https://learn.microsoft.com/en-us/mem/intune/apps/apps-win32-add

    And for the .NET runtimes simple app, after testing, I find the silent install command as below.

    dotnet-runtime-8.0.5-win-x64.exe /install /quiet

    User's image

    We can wrap this app to. intunewin and deploy it via Win32 as well. The detection rule can detect C:\Program Files\dotnet\dotnet.exe or if it has registry key set, you can also choose registry key to detect.

    https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net80

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Hans Hommens 0 Reputation points
    2024-09-09T07:31:12.52+00:00

    @Woodson Baldwin It is possible to use winget for installations within a SYSTEM context, I have successfully done that.

    It does require a specific approach as winget is not recognized as a command. You can get around that by telling the script where the winget executable is and then run the program from that folder.

    Specifically, you need the following script to install scripts from the SYSTEM account:

    $App = "YourAppToInstall.WingetID"
    
    $ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"
        if ($ResolveWingetPath){
               $WingetPath = $ResolveWingetPath[-1].Path
        }
    
    $Wingetpath = Split-Path -Path $WingetPath -Parent
    cd $wingetpath
    .\winget.exe install --exact --id $App --silent --accept-package-agreements --accept-source-agreements --scope machine
    

    Thanks to Rudy Ooms for the instructions about this! (source: https://call4cloud.nl/2021/05/cloudy-with-a-chance-of-winget/#Installing_Applications)

    You can test this via PSExec: start a session as SYSTEM and try it out!

    See this source for further information: https://powershelltoolbox.tech/testing-powershell-scripts-as-the-system-account/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.