FEP 2010 UNC Updates

Ive been playing around with FEP 2010 to replace SEP eventually.  The biggest issue I had was getting definitions out through SCCM since you cant auto-approve (fixed in SCCM 2012). *I should probably note it IS possible, however you have to go against the “never touch the wsus console” recommendation, so I didnt want to use that method* So for now, I was able to find a script to use the network definitions.  Make sure you create the directories first. The part after c:\defs is the important part, change c:\defs to your path, do not change the hierarchy after that. Then you can change the path in the script to match. Save the below code as a vbs file, then set up a scheduled task to run it. MS updates the definitions 3 times per day, so do what you are comfortable with.

strMSEx86URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x86"
strMSEx86Location = "C:\defs\Updates\x86\mpam-fe.exe"
strNISX86URL = "http://download.microsoft.com/download/DefinitionUpdates/x86/nis_full.exe"
strNISX86Location = "C:\defs\Updates\x86\nis_full.exe"
strMSEx64URL = "http://go.microsoft.com/fwlink/?LinkID=121721&clcid=0x409&arch=x64"
strMSEx64Location = "C:\defs\Updates\x64\mpam-fe.exe"
strNISX64URL = "http://download.microsoft.com/download/DefinitionUpdates/amd64/nis_full.exe"
strNISX64Location = "C:\defs\Updates\x64\nis_full.exe"

Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objWINHTTP.open "GET", strMSEx86URL, false
objWINHTTP.send

If objWINHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objWINHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to

Set objFSO = Createobject("Scripting.FileSystemObject")
'check if file exists if so delete
If objFSO.Fileexists(strMSEx86Location) Then objFSO.DeleteFile(strMSEx86Location)
objADOStream.SaveToFile strMSEx86Location
objADOStream.Close
End IF

Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objWINHTTP.open "GET", strNISx86URL, false
objWINHTTP.send

If objWINHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objWINHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to
Set objFSO = Createobject("Scripting.FileSystemObject")
'check if file exists if so delete
If objFSO.Fileexists(strNISx86Location) Then objFSO.DeleteFile (strNISx86Location)
objADOStream.SaveToFile strNISx86Location
objADOStream.Close
END IF

Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objWINHTTP.open "GET", strNISx64URL, false
objWINHTTP.send

If objWINHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objWINHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to
Set objFSO = Createobject("Scripting.FileSystemObject")
'check if file exists if so delete
If objFSO.Fileexists(strNISx64Location) Then objFSO.DeleteFile (strNISx64Location)
objADOStream.SaveToFile strNISx64Location
objADOStream.Close
END IF

Set objWINHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
objWINHTTP.open "GET", strMSEx64URL, false
objWINHTTP.send

If objWINHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objWINHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to

Set objFSO = Createobject("Scripting.FileSystemObject")
'check if file exists if so delete
If objFSO.Fileexists(strMSEx64Location) Then objFSO.DeleteFile(strMSEx64Location)
objADOStream.SaveToFile strMSEx64Location
objADOStream.Close
END IF

After you do that, set your network path in your FEP policy in SCCM to point to the folder share. So for example if you had c:\defs shared as \\fepupdates\defs then the path should be \\fepupdates\defs\updates. You need to specifiy the path up to the updates part. FEP knows to look in either the x86 or x64 directory.

Filed under: FEP, Microsoft, SCCM | Posted on April 26th, 2011 by CharlieMaurice

Leave a Reply

RSS Feed

Categories

Archives

Blogroll

Meta

Copyright © 2017 Charlie's Tech Ramblings. All rights reserved.

Tech Blue designed by Hive Designs • Ported by Free WordPress Themes