Code: Select all
$Path = "C:\Program Files (x86)\Caphyon\Advanced Installer 13.1\bin\x86\AdvancedInstaller.com"
$parameters ="\newproject C:\hello.aip"
$pinfo = New-Object System.Diagnostics.ProcessStartInfo
$pinfo.FileName = "$path"
$pinfo.RedirectStandardError = $true
$pinfo.RedirectStandardOutput = $true
$pinfo.UseShellExecute = $false
$pinfo.Arguments = "$parameters"
$pinfo.WindowStyle="hidden"
$p = New-Object System.Diagnostics.Process
$p.StartInfo = $pinfo
$p.Start() | Out-Null
$p.WaitForExit()
$stdout = $p.StandardOutput.ReadToEnd()
$stderr = $p.StandardError.ReadToEnd()
Write-Host $p.ExitCode
FOLLOW US
Get the latest news in Application Packaging