Dan
Posts: 4524
Joined: Wed Apr 24, 2013 3:51 pm

Execute PowerShell script as a build event

Hello,

Although Advanced Installer has support for predefined operations executed as build events, you can also execute custom PowerShell scripts.


Build event.PNG
Build event.PNG (40.7 KiB) Viewed 371435 times


It is a simple PowerShell script that displays a messagebox with the path where the folder is located.

Code: Select all

$workingPath = Get-Location

#Display current location in a message box
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
[System.Windows.Forms.MessageBox]::Show($workingPath)


The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.

Best regards,
Dan
Attachments
Run PowerShell script pre-build event.zip
(3.07 KiB) Downloaded 3058 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”