'Ensure integrity of WI metadata which could fail used APIs otherwiseĮnsureValidWIMetadata HKCU, "Software\Classes\Installer\Products" ,COMPRESSEDĮnsureValidWIMetadata HKCR, "Installer\Products" ,COMPRESSEDĮnsureValidWIMetadata HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" ,COMPRESSEDĮnsureValidWIMetadata HKLM, "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components" ,COMPRESSEDĮnsureValidWIMetadata HKCR, "Installer\Components" ,COMPRESSED SOInstallRoot = sProgramFiles & "\Microsoft Office\" &OREF If NOT RegReadValue(HKLM, "SOFTWARE\Microsoft\Office\" &OVERSION& "\Common\InstallRoot", "Path" ,sOInstallRoot, "REG_SZ" ) Then If NOT fCScript AND NOT fQuiet Then RelaunchAsCScript If Not oFso.FolderExists(sScrubDir) Then oFso.CreateFolder sScrubDir Set dicCSingle = CreateObject( "Scripting.Dictionary" ) Set dicCSuite = CreateObject( "Scripting.Dictionary" ) Set dicSrv = CreateObject( "Scripting.Dictionary" ) Set dictinaryKeepReg = CreateObject( "Scripting.Dictionary" ) Set dicDelRegKey = CreateObject( "Scripting.Dictionary" ) Set dicApps = CreateObject( "Scripting.Dictionary" ) Set dictinaryKeepFolder = CreateObject( "Scripting.Dictionary" ) Set dictinaryKeepLis = CreateObject( "Scripting.Dictionary" ) Set dictinaryKeepSku = CreateObject( "Scripting.Dictionary" ) Set dicRemoveSku = CreateObject( "Scripting.Dictionary" ) Set dicInstalledSku = CreateObject( "Scripting.Dictionary" ) Set dictinaryKeepProd = CreateObject( "Scripting.Dictionary" ) Log "Insufficient registry access permissions - exiting" If UCase(Mid(Wscript.FullName, Len(Wscript.Path) + 2, 1 )) = "C" Then If InStr(LCase(wscript.path), "syswow64" ) > 0 Then RelaunchAs64Host 'Check if we're running as 32 bit process on a 64 bit OS IVersionNt = CInt (arrVersion ( 0 )) * 100 + CInt (arrVersion ( 1 )) SOSinfo = sOSinfo & ", " & "Language: " & Item.OSLanguageĪrrVersion = Split(sOsVersion, Delimiter(sOsVersion)) SOSinfo = sOSinfo & ", " & "Country Code: " & Item.Countr圜ode SOSinfo = sOSinfo & ", " & "Codepage: " & Item.CodeSet SOSinfo = sOSinfo & ", " & "Version: " & Item.Version SOSinfo = sOSinfo & ", " & "SP " & Item.ServicePackMajorVersion SOSinfo = sOSinfo & Item.OtherTypeDescription Set ComputerItem = oWmiLocal.ExecQuery( "Select * from Win32_OperatingSystem" ) If f64 Then sCommonProgramFilesX86 = oWShell.ExpandEnvironmentStrings( "%CommonProgramFiles(x86)%" ) If f64 Then sProgramFilesX86 = oWShell.ExpandEnvironmentStrings( "%programfiles(x86)%" ) 'CAUTION! -> "fForce" will kill running applications which can result in data loss! "fForce" will kill running applications which can result in data loss! 0 ![]() 'Only for use without command line parametersĬonst COMPPERMANENT = "00000000000000000000000000000000"Ĭonst REG_ARP = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"Ĭonst LYNC_ALL = ""ĭim oFso, oMsi, oReg, oWShell, oWmiLocal, oShellAppĭim ComputerItem, Item, LogStream, TmpKeyĭim arrTmpSKUs, arrDeleteFiles, arrDeleteFolders, arrMseFolders, arrVersionĭim dictinaryKeepProd, dictinaryKeepLis, dicApps, dictinaryKeepFolder, dicDelRegKey, dictinaryKeepRegĭim dicInstalledSku, dicRemoveSku, dictinaryKeepSku, dicSrv, dicCSuite, dicCSingleĭim sErr, sTmp, sSkuRemoveList, sWinDir, sWICacheDir, sModeĭim sAppData, sTemp, sScrubDir, sProgramFiles, sProgramFilesX86, sCommonProgramFilesĭim sAllusersProfile, sOSinfo, sOSVersion, sCommonProgramFilesX86, sProfilesDirectoryĭim sProgramData, sLocalAppData, sOInstallRoot, sScriptDirĭim fRemoveCSuites : fRemoveCSuites = Falseĭim fRemoveCSingle : fRemoveCSingle = Falseĭim fKeepUser : fKeepUser = True 'Default to keep per user settingsĭim fSkipSD : fSkipSD = False 'Default to not Skip the Shortcut Detectionĭim fKeepSG : fKeepSG = False 'Default to not override the SoftGrid detectionĭim fNoReboot : fNoReboot = True 'Default to offer reboot prompt if neededĭim fTryReconcile : fTryReconcile = Falseĭim fC2rInstalled : fC2rInstalled = False ' Section for script behavior customizations ' when a regular uninstall is no longer possible ' Script to remove (scrub) Office 2016 MSI products ' Copyright (c) 2015 Microsoft Corporation ' Author: Microsoft Customer Support Services
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |