PowerShell for Wix Components

Written on February 17, 2009

The following snippet is useful for generating a list of components with unique Guids. Run it from the directory that contains the components:

$files = Get-ChildItem

$g = [System.Guid]

foreach ($a in $files) { Write-Output (“\`n\`t\`n” -f $a.Name, $g::NewGuid() ) }

Categories: PowerShell