Not that often but sometimes I need to extract some dlls from msi packages. msiexec provides all the functions which are needed as described here.
Usually I’m working using the command line
msiexec /a foo.msi /qb TARGETDIR="C:\TEMP\Foo"
but sometimes it’s helpful to have a context menu entry like this.
To add the Extract MSI entry to the context menu you’ve to add it to the registry, details here or use gist below. The second gist shows how a .bat file which can extract all msi’s in a folder can look like.
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Classes\Msi.Package\shell\Extract MSI\command] | |
@="msiexec.exe /a \"%1\" /qb TARGETDIR=\"%1 Extracted\"" |
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
@echo off | |
SET orgdir=%CD% | |
REM echo %orgdir% | |
FOR %%f IN (*.msi) DO ( | |
REM echo %%f | |
REM echo %orgdir%\%%~nf\ | |
msiexec.exe /a %%f /qb TARGETDIR=%orgdir%\%%~nf\ | |
) |
No comments:
Post a Comment