[wix-users] Running a powershell script as a custom action...

Joel Budreau joel.budreau at gmail.com
Thu Jul 13 16:00:01 PDT 2017


Hi all,

It appears that the unofficial/official way to detect if a program is
running inside of an Azure VM is to run this powershell script:
https://gallery.technet.microsoft.com/scriptcenter/Detect-Windows-Azure-aed06d51

This script returns 'True' or 'False' to signify that we're running inside
an Azure VM. So, what's the right way to make use of this script inside an
installer?

- Modify the script so that it writes a MSI property like
RunningInsideAzureVM=1 instead of returning true/false and call directly
from the Binary table?
- Extract the script from the Binary table through an immediate action and
call it from a dll custom action, reading the return value and then setting
the MSI property?
- Some other way that I'm not aware of?

Thanks,
Joel


More information about the wix-users mailing list