This commit is contained in:
2020-08-18 16:20:20 -04:00
parent 98fb3928c5
commit cb110b354d
26 changed files with 225 additions and 201 deletions
+36
View File
@@ -0,0 +1,36 @@
## List of all scripting component DLL files
$DLL_FILES = @("${Env:WINDIR}\system32\vbscript.dll",
"${Env:WINDIR}\system32\jscript.dll",
"${Env:WINDIR}\system32\dispex.dll",
"${Env:WINDIR}\system32\scrobj.dll",
"${Env:WINDIR}\system32\scrrun.dll",
"${Env:WINDIR}\system32\wshext.dll"
"${Env:WINDIR}\system32\wshom.ocx",
"${Env:WINDIR}\syswow64\vbscript.dll",
"${Env:WINDIR}\syswow64\jscript.dll",
"${Env:WINDIR}\syswow64\dispex.dll",
"${Env:WINDIR}\syswow64\scrobj.dll",
"${Env:WINDIR}\syswow64\scrrun.dll",
"${Env:WINDIR}\syswow64\wshext.dll",
"${Env:WINDIR}\syswow64\wshom.ocx")
## Unregister all DLLs
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
}
}
## Register all DLLs
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 "/s ${dll}" -Wait
}
}