Execute-process setup.exe with responsefile

Hi Expert,

Need help on this. I follow existing thread to perform the installation for SAS deployment wizard (link below).

Passing response file in execute-process - The Toolkit / General Discussion - PSAppDeployToolkit Community

And create mine below, but it seems not working. Setup.exe is running but hangging there for a very long time. Let me know if i did it wrong in anyway.

**Execute-process -Path "$dirfiles\setup.exe" -parameters "-f '"$dirFiles\sdwresponse.properties'"" -windowstyle 'hidden'**

Running in cmd command is working fine :

**setup.exe -quiet -responsefile "C:\_INTUNE\APDT\SAS Institute Inc\SAS\9.4\Source\Files\sdwresponse.properties"**


Are you able to confirm the Install command is:

Execute-process -Path "$dirfiles\setup.exe" -parameters "-f `"$dirFiles\sdwresponse.properties`"" -windowstyle 'hidden'

and not (as copied from your question above):

Execute-process -Path “$dirfiles\setup.exe” -parameters “-f '”$dirFiles\sdwresponse.properties’“” -windowstyle ‘hidden’

Note the incorrect quotation types around your commands “ & ” rather than ", and ‘ & ’ rather than '

I’d also suggest your two commands are slightly different, the PSADT (PowerShell) command is missing the quiet parameter (so ‘may’ be launching a GUI hidden (in the System context?)), so I think you command should be:

Execute-process -Path "$dirfiles\setup.exe" -parameters "-quiet -f `"$dirFiles\sdwresponse.properties`"" -windowstyle 'hidden'

@Adrian_Scott, As Moderator I’m able to fix posts and it turns out the curly double quotes are a side effect of Hyan not using the <\> Preformated Text tool on code in his post.

I have fixed Hyan’s post by adding back-ticks on his lines of code so that Discourse site shows them properly.


I used the PowerShell App Deploy Toolkit a few years ago to create a packaged install for SAS Enterprise Guide. One thing I can recommend is to remove the “-quiet” and “-windowstyle ‘hidden’” parameters until you’re certain the install works as intended.

Initially the install wasn’t working for me, and once I removed those parameters and watched the install on one of my test devices, I was able to see the dialog that SAS displayed showing the various steps of the install (think there were 20+ individual steps it detailed in the dialog), and I was able to see an error that I hadn’t been aware of. Think it was with a prerequisite needed for the install–I either hadn’t included it or had a wrong version.

Once I was consistently getting a succesfull install, I then added back in the parameters to make the install quiet, etc.


I used command @Adrian_Scott & @That-Annoying-Guy commented. seems like working. setup.exe is running now. will see how it progress. Thank you both.

Execute-Process -path “$dirFiles\setup.exe” -parameters “-f "$dirFiles\sdwresponse.properties”" -windowstyle ‘Hidden’


1 Like

Do you mind share your command @gordo?

The command that eventually worked for me:
Execute-Process -Path “$InstallPath\setup.exe” -Parameters “-wait -quiet -responsefile "$InstallPath\SAS_EG.properties” -quietstatus -allselectable -defaultproductset -skiplocaleprompt -dotnetdetect" -IgnoreExitCodes ‘-1’

During testing, I didn’t include the parameters “-quiet” or “-quietstatus” so that I could see the progress dialog the install displayed, which eventually led me to being able to detect the thing that was broken (think it was a missing prerequisite or wrong version or some similar thing).

Once I was able to get a working install with all the install dialogs visible, I added those two parameters back in and then the package was production-ready.


Hi @Adrian_Scott @That-Annoying-Guy @gordo,

My working Powershell script as below, without REBOOT PROMPT midway~

Thank you all who helping me out! :slight_smile: :innocent:

Execute-Process -path “$dirFiles\setup.exe” -parameters “-wait -quiet -responsefile "$dirFiles\sdwresponse.properties”" -windowstyle ‘Hidden’ -PassThru


Hello Guys,

May i know if anyone experienced before, the script work during testing, with exit code 0 but failed deployment in intune?

The size of the intunewim file closely to 10GB The status is error downloading content. Installation status in company portal is 100%. Seems the files in IMECache folder is not sync completely.

[Installation] :: Execution failed with exit code [-1].

Any idea feel free to share yea…thanks~

Where do you get:
[Installation] :: Execution failed with exit code [-1]

Intune or PSADT?

BTW: for Intune’s IME log files I use Get-IntuneManagementExtensionDiagnostics to understand WTF is going on:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.