public void ExecuteScript(string installPath, string scriptPath, IPackage package)
{
string fullPath = Path.Combine(installPath, scriptPath);
if (File.Exists(fullPath))
{
string folderPath = Path.GetDirectoryName(fullPath);
Invoke(
"$__pc_args=@(); $input|%{$__pc_args+=$_}; & " + PathHelper.EscapePSPath(fullPath) + " $__pc_args[0] $__pc_args[1] $__pc_args[2]; Remove-Variable __pc_args -Scope 0",
new object[] { installPath, folderPath, package },
outputResults: true);
}
}