IExeWithWorkingDirectoryCustomAction

Declaration

IExeWithWorkingDirectoryCustomAction : ICustomAction

Overview

This interface facilitates editing custom action for launching existing executable file on the disk. The file has a designated folder as Working Directory .

Properties

String FilePath - Gets or sets the path to the executable file.

String CommandLine - Get or sets the command line arguments for launching executable file.

IFolder WorkingDirectory - Get or sets the working directory for launching executable file.

Examples

     $advinst = new-object -com AdvancedInstaller
$project = $advinst.CreateProjectS(“architect”)
$project.FilesComponent.AddFileS("appdir", "D:\MyApp.exe")
$dir = $project.FoldersComponent.FindFolderByPath("appdir")
$custAct = $project.CustomActionsComponent.NewLaunchExeWithWorkingDirectory($dir)
$custAct.FilePath = "[#MyApp.exe]"

   

See also

ISearch

IAdvinstProjectTypes