The Microsoft .NET 3.5 (Workstations) 3.5.1 (Updated 1903) package fails when deploying to Windows 10 x64 (1607) with error code: -2146498529. It appears the batch file runs DISM and targets the included SXS package, but cannot resolve the path.

The script being used includes:

%SYSTEMROOT%\system32\DISM.exe /online /enable-feature /featurename:NetFx3 /All /Source:.\sxs /LimitAccess

.\ is going to target the current working directory, but the SXS folder isn't necessarily a child of the CWD. To fix this we can instead reference the location the batch file is running from, since PDQ Deploy is going to copy the batch script and the SXS folder into the same location.


%SYSTEMROOT%\system32\DISM.exe /online /enable-feature /featurename:NetFx3 /All /Source:%~dp0\sxs /LimitAccess

%~dp0 references the directory in which the batch file is located, so we know for sure the SXS folder will be a child.

login to comment