Hi there.

For a few years now, it’s always a pain installing software from my MDM that requires the .Net framework since I have to change the below key to 0, reboot, then install the software, change it back to 1, then reboot.

Even if I get the package from the ISO and run a powershell script, it errors out because I think it’s still looking to reach out to Windows update.

Any way around Windows Update? I can ask our admins to add .Net to the server, but I read that is not standard practice.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
Name: UseWUServer

*******Updated the above. I said WSUS above when I meant to say Windows Update! My fault!

2 Spice ups

You have a number of options.

  1. Import the package in to WSUS
  2. Don’t use WSUS at all - it’s deprecated now and there are much slicker products out there that handle this better (Vendors > Action1 offers 200 free licenses).
  3. Use a script and the FoD media to install it offline.

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /Source:D:\sources\sxs /LimitAccess

1 Spice up

I tried to get the sxs folder from a Win11 24H2 ISO, and use a script, but it still (I believe) tries to reach out to Windows update. I’ll try again using your script above an post the error in here.

You should use the FoD (features on demand) media, not the standard ISO.

The /LimitAccess switch tells it to use only the path you specify and not WSUS from the registry.

Won’t work. I downloaded the “FOD…” ISO from the below link. I entered in the command you see in the screenshot. I feel like I’m doing everything correctly. I may try on a freshly imaged PC before adding it to the domain to see what happens.

I also tried moving the .cab files to C:\temp pointing it to it there
I also tried putting in the full path to the .cab file.
I also tried extracting the files first

Tried this also:

Vague.

The command you have points to D: for language packs, but your package is in C:\temp\sxs, so this should be your source.

I’m not sure what your first path is, the files are not usually in a folder, just on the root of the ISO.

Any paths should be in double quotes " it looks like you are using single ’

Sorry about that. I tried a lot of things, like mounting the ISO then pointing it to D:.… But, the files mainly experiment with are in C:\temp\Source\sxs

The single quotes… It still seemed to take the command. That error came up after maybe 5 seconds, but I can try normal quotes. No problem.

I’ll get back to you later. I now am trying to download the PDQ package, zip up the files and the bat file, import it into my MDM. Looking at the registry and taskmanger, it seems to be work.

I’ll report back later.

*EDIT Yes, the bat file, along with the .cab file from PDQ seem to work. The PDQ bat file script language is below if it helps anyone else:

ECHO OFF
%SYSTEMROOT%\System32\dism.exe /online /Get-Featureinfo /FeatureName:NetFx3 | findstr Enabled
IF %ERRORLEVEL% EQU 0 (
ECHO .NET 3.5 is already enabled
) ELSE (
%SYSTEMROOT%\system32\DISM.exe /online /enable-feature /featurename:NetFx3 /All /Source:.\sxs /LimitAccess
)

The script isn’t doing anything different from what I already shared, with the exception of the source being \sxs.

But if this is solved, please mark a best answer so others can benefit from it, even if that’s your own reply.