major logging overhaul, plus other fixes
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user