Install .Net Framework 4.0 via Group Policy

Install .Net Framework 4.0 via Group Policy

How to Deploy Microsoft .NET Framework 4 with Group Policy with Startup Script

To deploy .NET Framework 4 to your network you must use a startup script. No longer can you push .NET Framework out via an MSI file as with earlier versions such as .NET Framework 1.1.
  1. Use the script below to push the .NET framework to all x86 and x64 windows based PC's on your network.
  2. Copy and Modify the following as a ".bat" file.
setlocal

REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************

REM Enter the Product Name.
set ProductName=Microsoft .NET Framework 4 Client Profile

REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\kbomb.local\netlogon\software

REM Set LogLocation to a central directory to collect log files.
set LogLocation=C:\Windows\Logs

REM *********************************************************************
REM Deployment code begins here. Do not modify anything below this line.
REM *********************************************************************

IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)

REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
:ARP64
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%"
if NOT %errorlevel%==1 (goto End)

REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
:ARP86
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%"
if %errorlevel%==1 (goto DeployOffice) else (goto End)

REM If 1 returned, the product was not found. Run setup here.
:DeployOffice
start /wait %DeployServer%\dotNetFx40_Full_x86_x64.exe /passive
echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End

Endlocal

  1. You MUST modify the DeployServer path to fit your environment.
  2. Copy the script into the startup script folder inside the group policy object.
  3. Make sure you use a startup script and NOT a logon script! Refer to the following screenshot:
  4. The script is called frameworkinstall.bat
  5. Link this group policy object to your computer accounts.
  6. When the workstations refresh there group policy they will automatically install .NET Framework v4 on next reboot.

    • Related Articles

    • Install Guide - LG WebOS2/S3.0

      Read First: Install Checklist - Hardware & Network Requirements Note: it is recommended that you have a Wireless (USB) Keyboard & Mouse to perform this operation. Plug the USB receiver into the USB port on the LG (webOS) display. Supported LG Models ...
    • Install Guide for Philips (Android) Browser app

      Read First - Install Checklist - Hardware & Network Requirements We recommend using a Wireless (USB) Keyboard & Mouse to perform this operation. Plug the USB receiver into the USB port. Supported Philips models Purchase one of the following supported ...
    • Install Guide - LG WebOS3.2/4.0+/6.0

      Read First Pre-Install tips Read the Install Checklist - Hardware & Network Requirements To save time, use a Wireless (USB) Keyboard & Mouse Contact support@vibe.fyi if you have not received the site URL and auth code(s). Please make sure you have Lg ...
    • Install Guide - Samsung Tizen v4.0/v6.5

      Read First Pre-install tips Read the Install Checklist - Hardware & Network Requirements To save time, use a Wireless (USB) Keyboard & Mouse Contact support@vibe.fyi if you have not received the site URL and auth code(s). Please make sure you have ...
    • Supported Digital Signage Devices

      Use this article as a guide when purchasing your Digital Signage devices LG WebOS SoC Vibe.fyi recommends LG commercial screens running System on Chip (SoC) technology as the most robust, reliable and secure solution for your digital signage network. ...