PowerShell Automation

<< Click to Display Table of Contents >>

RayPack > 7.3 u6 > User Guide > Command Line Tools 

PowerShell Automation

Certain actions on MSI and RPP projects are exposed via the RayPack PowerShell module.

 

In order to get started, make sure that the module is imported. Invoke the following command in PowerShell terminal of your choice:

 

Import-Module "<RayPackInstallDir>\Libraries\Raynet.RayPack.Automation.dll"

 

You can show the available commands by invoking the following PowerShell code:

 

 (Get-module Raynet.RayPack.Automation).ExportedCommands

 

Sample Usage

The following script opens an RPP project, changes one of its properties and then builds MSI out of it.

 

$project = Open-Project -File "C:\demo\input.rpp";

[string]$msiPath = "C:\demo\output.msi";

 

try

{

 Set-Property $project -Name "ProductVersion" -Value "1.2.3";        

 ConvertTo-Msi -Project $project -Target $msiPath -UpdateProductCode $true -UpdateFileProperties $true -MediaLayout CompressedInternal | Out-Null;

}

finally

{

 Close-Project -Project $project;

}