A Collection of templates that can be used for abusing window's AlwaysInstallElevated policy
- alwaysInstallElevated-1.wxs
- a wxs template to execute system commands.
- alwaysInstallElevated-2.wxs
- a wxs template to execute command then intentionally fails so it won't be registered as an installed program.
- alwaysInstallElevated-3.wxs
- a wxs template to embed executable (exe) file into the msi package and execute it during installation.
- Change the first
ExeCommand
variable to desired command - Download the WiX Toolset Binaries
- Compile alwaysInstallElevated.msi by running:
candle alwaysInstallElevated.wxs
light alwaysInstallElevated.wixobj
- Execute on target by running:
alwaysInstallElevated.msi /q
-
or use
msiexec
implecitelymsiexec /i alwaysInstallElevated.msi /qn
-
To uninstall it
msiexec /x alwaysInstallElevated.msi /qn
-