zpanderson88
Posts: 4
Joined: Fri Dec 15, 2017 12:37 am

Using SOURCEDIR in powershell script

I am trying to create a package that's sole purpose is to run an inline PowerShell script. In that script I am trying to get the value of SOURCEDIR so that I can use the path for a few things. I followed the section here:

https://www.advancedinstaller.com/user- ... ell-script

And added this code:

Code: Select all

$sourceDir = AI_GetMsiProperty SOURCEDIR


When I run the installer though the value always turns out to be null. I saw a previous post to make sure that my PowerShellScriptInline custom action is after the CostFinalize standard action and it is.

I'm sure this is some basic misunderstanding of mine, but hopefully someone can help.

Thanks
zpanderson88
Posts: 4
Joined: Fri Dec 15, 2017 12:37 am

Re: Using SOURCEDIR in powershell script

I had a bug in my script that was causing this. This post can be removed.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Using SOURCEDIR in powershell script

Hello,

We're glad that you've sorted things out.

Just let us know if you have any other questions or doubts.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”