Created
May 21, 2016 04:16
-
-
Save MSAdministrator/fafa2b0ff0f72e672f8c5c824076ebbf to your computer and use it in GitHub Desktop.
Build-MSI
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
<# | |
.Synopsis | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> | |
function Build-MSI | |
{ | |
[CmdletBinding()] | |
[Alias()] | |
Param | |
( | |
# Param1 help description | |
[Parameter(Mandatory=$true, | |
ValueFromPipelineByPropertyName=$true)] | |
$MSI | |
) | |
Begin | |
{ | |
#InstEd Defaults - InstEd PLUS REQUIRED FOR THIS TO WORK | |
$instEDLocation = "C:\Program Files (x86)\instedit.com\InstEd\InstEd.exe" | |
} | |
Process | |
{ | |
#CODE TO REBUILD CAB | |
& "$instEdLocation" plugin_cmd "$MSI" -plugin:InstEdPlus rebuild_cabs | |
start-sleep -s 1 | |
while (Get-Process instEd) | |
{ | |
start-sleep -Milliseconds 500 | |
}#function designed to wait until insted finishes before moving on to signing | |
} | |
End | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment