Install setup.exe with Parameters

Hi, my setup exe is only working like this:

%~dp0setup\setup.exe HideUI=1 AcceptLicenseTerms=1 LicenseTermsVersion=en-us InstallClientUI=1 ClientAosServer=SXSRV03 ClientLanguage=en-us ClientConfigFile=%~dp0\XZZZ.axc

When i split it up it fails:

Execute-Process -Path “setup.exe” -Parameters ‘HideUI=1 AcceptLicenseTerms=1 LicenseTermsVersion=en-us InstallClientUI=1 ClientAosServer=SXSRV03 ClientLanguage=en-us ClientConfigFile=%~dp0\XZZZ.axc’

So the parmeters must be directly behind the setup.exe.

Any idear??

Thank you

FYI: This is not strictly a PSADT issue

But, the ClientConfigFile= setting is a Command string which would work fine from a command prompt but Powershell would not understand it or specifically the %~dp0 part of the command (which you have stripped off of the Execute-Process -Path "setup.exe"), If (I’m guessing) this is referring to the current folder you could try replacing it with .\XZZZ.axc
So the full command line would read:

Execute-Process -Path "setup.exe" -Parameters 'HideUI=1 AcceptLicenseTerms=1 LicenseTermsVersion=en-us InstallClientUI=1 ClientAosServer=SXSRV03 ClientLanguage=en-us ClientConfigFile=.\XZZZ.axc'

N.B. You may also need to either set the Path to the fiull path to the setup.exe file or try using the current path i.e. ".\setup.exe"