Hello everyone,
I am attempting to create a basic install PowerShell script for *.exe and *.msi files; now I know this will not be the seem for everything of course but I am trying to get as close as possible with little change to the script but I am lost when it comes to adding a license key into the script to license the product I am installing.
Below is what I have so far, which works and install the product BUT it is still creating a shortcut which I do not want and of course the product requires a license to completely install. I tried looking on Google for examples but could find anything, any help in this area would be awesome. I am still new to PowerShell but learning day by day, in advance thank you for your help and comments.
Ralph
$SCRIPTROOT = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$EXEPATH1 = "$SCRIPTROOT\product name.exe"
$EXEARG1 = "/quiet","shortcut_Desktop=0"
Write-Host "Running NX"
$PS = Start-Process -FilePath $EXEPATH1 -ArgumentList $EXEARG1 -Wait -PassThru
do {} until ($PS.HasExited)
$ECODE = $PS.ExitCode
if (($ECODE -ne 0) -and ($ECODE -ne 1603)){
Write-Host "product name has completed with exit code of $ECODE"
} else {
Write-Host "product name Installation Complete!"