Land #5960, @wchen-r7's MSU extractor

bug/bundler_fix
jvazquez-r7 2015-09-16 15:07:54 -05:00
commit 0682eec57d
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 36 additions and 0 deletions

36
tools/extract_msu.bat Normal file
View File

@ -0,0 +1,36 @@
@echo off
@setlocal EnableDelayedExpansion
@set arg=%~1
if [%arg%] == [] (
echo Argument Missing:
echo You must provide a directory that contains
echo all the Windows patches in *.msu format.
echo To Download patches manually, please go:
echo http://mybulletins.technet.microsoft.com/BulletinPages/Dashboard
exit /B
)
if not "!arg:~-1,1!" == "\" (
@set arg=!arg!\
)
for /f %%f in ('dir /B %arg%') DO (
@set fname=%%f
@set lastfourchars=!fname:~-4,4!
if "!lastfourchars!" == ".msu" (
@set newname=!fname:~0,-4!
mkdir %arg%!newname!
mkdir %arg%!newname!\extracted
expand /F:* %arg%!fname! %arg%!newname!
expand /F:* %arg%!newname!\!newname!.cab %arg%!newname!\extracted
)
)
echo Done!
echo Now go to %arg%,
echo and then use the search feature from Windows to
echo find the files you're interested in.