Execute Command in Custom Directory - Efficient File Management

Execute Command in Custom Directory - Efficient File Management

Michael Lv8

Execute Command in Custom Directory - Efficient File Management

Table of Contents

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

IExeWithWorkingDirectoryCustomAction

https://techidaily.com

Declaration

IExeWithWorkingDirectoryCustomAction : ICustomAction

https://techidaily.com

Overview

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

https://techidaily.com

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]”

Copy

https://techidaily.com

See also

ISearch

IAdvinstProjectTypes

Did you find this page useful?

Please give it a rating:

Thanks!

Report a problem on this page

Information is incorrect or missing

Information is unclear or confusing

Something else

Can you tell us what’s wrong?

Send message

Also read:

  • Title: Execute Command in Custom Directory - Efficient File Management
  • Author: Michael
  • Created at : 2024-10-03 16:58:34
  • Updated at : 2024-10-10 22:40:27
  • Link: https://fox-web3.techidaily.com/execute-command-in-custom-directory-efficient-file-management/
  • License: This work is licensed under CC BY-NC-SA 4.0.