![]() CreateFolder ( strDirectory ) Log " Created folder: " & strDirectory End If 'Check if the WIM file is there, else exit If objFSO. FolderExists ( strDirectory ) Then Log " Folder already exists: " & strDirectory Else objFSO. quit End If End If Log " Architecture: " & intArch ' Create the File System Object Set objFSO = CreateObject ( "Scripting.FileSystemObject" ) ' Check that the strDirectory folder exists, else create it If objFSO. ExpandEnvironmentStrings ( "%ALLUSERSPROFILE%" ) & "\WDOUpdater\files64\" strArch = "圆4" strImage = "WDO 64-bit" strWIMfile = "WDO64.wim" Else Log " *ERROR* Invalid Arch argument." Log vbcrlf Log "*FORCE QUIT*" wscript. ExpandEnvironmentStrings ( "%ALLUSERSPROFILE%" ) & "\WDOUpdater\files32\" strArch = "x86" strImage = "WDO 32-bit" strWIMfile = "WDO32.wim" Else If intArch = 64 Then strDirectory = objShell. ExpandEnvironmentStrings ( "%WINDIR%" ) & "\system32\" Log "" Log " - RePlacer() initialized." If intArch = 32 Then strDirectory = objShell. Option Explicit Log vbcrlf Log "_" Log "" Log "= WDOUpdater INITIALIZED =" 'Complete the 32-bit update Call Downloader ( "Def", 32 ) Call Downloader ( "Pack", 32 ) Call UnPacker ( 32 ) Call RePacker ( 32 ) Call RePlacer ( 32 ) 'Complete the 64-bit update Call Downloader ( "Def", 64 ) Call Downloader ( "Pack", 64 ) Call UnPacker ( 64 ) Call RePacker ( 64 ) Call RePlacer ( 64 ) Log "= WDOUpdater COMPLETE =" Log "" Log "_" Sub RePlacer ( ByVal intArch ) Dim strDirectory, strArch, strImage, strWIMfile, strWDSutilDirectory Dim objFSO, objShell, objFile Set objShell = CreateObject ( "WScript.Shell" ) strWDSutilDirectory = objShell. See my How-To one getting it initially set up: If you have WDS set up with a WDO boot image, then simply run this script every night to keep the definition files up to date.Īs I am relatively new to VBScript, any pointers are always appreciated! Needs to be run with elevated priveledges Replaces boot images called: "WDO 32-bit" or "WDO 64-bit", so the first time around, you'll need to comment out the Replacer() sub and manually add the image or you can follow my How-to ![]() Outputs logs to "C:\programdata\wdoupdater\wdoupdater logs\wdoupdater.log" This script takes advantage of that by downloading the proper files, creating the bootable WIM, and then replacing the boot image on your WDS server. Whats pretty sweet about WDO is that you can use it to create a boot image in WDS to run offline scans on PXE enabled clients. This script is more of a niche script for those of us who use Windows Defender Offline (WDO). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |