Last active
May 27, 2024 17:26
-
-
Save sefgit/803f1a288ef018894eb23695a8b53467 to your computer and use it in GitHub Desktop.
Scripts to unblock dlls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path . -Recurse -Filter *.dll -File -Name | Unblock-File |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
from glob import iglob | |
from os.path import dirname | |
workdir = dirname(__file__) | |
pattern = join(workdir, "**", "*.dll") | |
for file in iglob(pattern, recursive=True): | |
cmd = f'Unblock-File -Path "{file}"; Write-Output "{file} unblocked"' | |
subprocess.run(["powershell", "-Command", cmd]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment