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?

Developer technologies .NET .NET Runtime
Microsoft Security Intune Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Crystal-MSFT 53,981 Reputation points Microsoft External Staff
    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

  3. Patrick Tippner 1 Reputation point
    2025-06-24T11:19:38.6366667+00:00

    What is the recommendation regarding the detection rules? I usually use the uninstall-path from the registry, but this will trigger a reinstallation of the older version of the runtime through Intune once a newer version was automatically deployed through Windows update (which will remove the older version installed via Intune). Is there a specific file where we could use the file-version comparison detection method using "greater than or equal" for the version to accomodate this situation?

    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.