Skip to content

Instantly share code, notes, and snippets.

@MSAdministrator
Created May 21, 2016 04:16
Show Gist options
  • Save MSAdministrator/fafa2b0ff0f72e672f8c5c824076ebbf to your computer and use it in GitHub Desktop.
Save MSAdministrator/fafa2b0ff0f72e672f8c5c824076ebbf to your computer and use it in GitHub Desktop.
Build-MSI
<#
.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