major logging overhaul, plus other fixes

This commit is contained in:
2020-10-22 14:01:35 -04:00
parent 77cf4d6276
commit 978373ebe2
27 changed files with 430 additions and 611 deletions
+9 -3
View File
@@ -1,4 +1,6 @@
## List of all scripting component DLL files
LogMsg "Fix-WindowsScriptingComponents.ps1"
## List of all scripting component DLL files
$DLL_FILES = @("${Env:WINDIR}\system32\vbscript.dll",
"${Env:WINDIR}\system32\jscript.dll",
"${Env:WINDIR}\system32\dispex.dll",
@@ -20,7 +22,9 @@ ForEach ($dll in $DLL_FILES)
If ( Test-Path $dll )
{
If ( $dll -Match "syswow64" ) { $REGSVR32 = "${Env:WINDIR}\syswow64\regsvr32" } Else { $REGSVR32 = "regsvr32" }
Start-Process "${REGSVR32}" -ArgumentList "/u /s ${dll}" -Wait
LogMsg "Unregister: ${dll}"
Try { Start-Process "${REGSVR32}" -ArgumentList "/u /s ${dll}" -Wait }
Catch { LogErr $_.Exception.Message }
}
}
@@ -31,6 +35,8 @@ ForEach ($dll in $DLL_FILES)
{
If ( $dll -Match "syswow64" )
{ $REGSVR32 = "${Env:WINDIR}\syswow64\regsvr32" } Else { $REGSVR32 = "regsvr32" }
Start-Process "${REGSVR32}" -ArgumentList "/s ${dll}" -Wait
LogMsg "Register: ${dll}"
Try { Start-Process "${REGSVR32}" -ArgumentList "/s ${dll}" -Wait }
Catch { LogErr $_.Exception.Message }
}
}