pwn
Posts: 1
Joined: Mon Aug 21, 2023 10:55 am

Custiom Action Powershell attached script file

Hi, i am currently trying to create a setup completely via Powershell and have encountered a problem that I have not yet been able to solve.

I want to add a Powershell script to the setup using the custom action “IPowershellAttachedScriptFile”, but I am missing the ability to enter parameters.

$advinst = new-object -com AdvancedInstaller
$project = $advinst.CreateProjectS(“architect”)
$custAct = $project.CustomActionsComponent.NewPowershellAttachedScriptFile("D:\my_script.ps1")

# Set “Is32Bit” and “Is64Bit” properties to true to auto detect OS bitness PowerShell executable
$custAct.Is32Bit = $true
$custAct.Is64Bit = $true

Link <https://www.advancedinstaller.com/user- ... tfile.html>

When running the same function through the GUI, call parameters can be added, see attached screenshot.
Clipboard.jpg
Clipboard.jpg (15.99 KiB) Viewed 946 times
Is this also available via Powershell, if so how do I have to proceed?
Does anyone have a tip for me?
Catalin
Posts: 6739
Joined: Wed Jun 13, 2018 7:49 am

Re: Custiom Action Powershell attached script file

Hello,

After further testing, it looks like this is not currently supported.

However, I have added an improvement on our TODO list and this should be available in a future version of Advanced Installer.

Thank you for bringing this to our attention!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6739
Joined: Wed Jun 13, 2018 7:49 am

Re: Custiom Action Powershell attached script file

Hello,

This improvement has been added in version 21.8.1 of Advanced Installer.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”