Enhancing Workflow Efficiency Through PowerShell's Attached Script Features

Enhancing Workflow Efficiency Through PowerShell's Attached Script Features

Anthony Lv8

Enhancing Workflow Efficiency Through PowerShell’s Attached Script Features

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.

IPowershellAttachedScriptFile

https://techidaily.com

Declaration

IPowershellAttachedScriptFile : ICustomAction

Overview

This interface facilitates editing custom action that allows launching an attached Powershell script file into execution.

https://techidaily.com

Properties

String ScriptFileSource - Gets or sets the source path to the attached script file.

Bool Is32Bit - Gets or sets the property of the custom action to run the 32-bit PowerShell executable. If Is64Bit value is also “true” then runs the Operating System bitness PowerShell executable (32-bit on x86 operating systems, 64-bit on x64).

Bool Is64Bit - Gets or sets the property of the custom action to run the 32-bit PowerShell executable. If Is32Bit value is also “true” then runs the Operating System bitness PowerShell executable (32-bit on x86 operating systems, 64-bit on x64).

https://techidaily.com

Examples

  $advinst = new-object -com AdvancedInstaller

$project = $advinst.CreateProjectS(“architect”)
$custAct = $project.CustomActionsComponent.NewPowershellAttachedScriptFile(“D:\my_script.ps1”)

https://techidaily.com

Set “Is32Bit” and “Is64Bit” properties to true to auto detect OS bitness PowerShell executable

$custAct.Is32Bit = $true
$custAct.Is64Bit = $true

Copy

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: Enhancing Workflow Efficiency Through PowerShell's Attached Script Features
  • Author: Anthony
  • Created at : 2024-10-27 16:56:36
  • Updated at : 2024-11-03 18:54:48
  • Link: https://fox-shield.techidaily.com/enhancing-workflow-efficiency-through-powershells-attached-script-features/
  • License: This work is licensed under CC BY-NC-SA 4.0.