Skip to content

Instantly share code, notes, and snippets.

@jamiedevsandbox
Last active April 19, 2021 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiedevsandbox/bdc6d3df463dd692db26868a043521de to your computer and use it in GitHub Desktop.
Save jamiedevsandbox/bdc6d3df463dd692db26868a043521de to your computer and use it in GitHub Desktop.
Debug/Extract MSI / EXE
Debug/Extract MSI/EXE (PE Header):
https://stackoverflow.com/questions/1547809/extract-msi-from-exe/24987512
https://superuser.com/questions/307678/how-do-i-extract-files-from-an-msi-package
ACL (Microsoft Access Control Lists, grant file permissions/set group):
icacls
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/icacls
View/Extract contents/internal files of MSI:
https://lessmsi.activescott.com/
https://github.com/activescott/lessmsi
-------------------------------------------------------------------------------------------
Example: test.msi
Grant full access permissions on EXE:
icacls test.msi /T /C /grant administrators:F
Extract files:
GUI: msiexec /a test.msi
no GUI: msiexec /a test.msi TARGETDIR=C:\extractdir\ /qn
progressbar GUI: msiexec /a test.msi TARGETDIR=C:\extractdir\ /passive
If extraction fails (Error: 1304, cannot write file due to insufficient privileges):
use lessmsi to extract remaining files into destination directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment