Skip to content

Commit

Permalink
create windows msi
Browse files Browse the repository at this point in the history
  • Loading branch information
dphulkar-msft committed Nov 4, 2024
1 parent 1a3104c commit de165d7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions setup/create_windows_msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ steps:
$wixXml.Wix.Product.Manufacturer = "Updated Manufacturer"
$wixXml.Wix.Product.UpgradeCode = $uuid
# Check if Component element exists and has a Guid attribute
if ($component -and $component.HasAttribute("Guid")) {
$component.SetAttribute("Guid", $uuid)
$component = $wixXml.Wix.Product.Directory.InstallDir.Component
# Check if Component element exists
if ($component) {
# Check if Guid attribute exists and set it, or add it if missing
if ($component.Attributes["Guid"]) {
$component.Attributes["Guid"].Value = $uuid
} else {
$component.SetAttribute("Guid", $uuid)
}
Write-Host "Guid attribute updated successfully."
} else {
Write-Host "Component element or Guid attribute not found in XML structure."
Write-Host "Component element not found in XML structure."
}
# Update the file source path
Expand Down

0 comments on commit de165d7

Please sign in to comment.