Need the execute-process with runas...

Topics: Archive - Deployment Scripts, Archive - General
Jan 7, 2015 at 10:04 AM
I have an Application that runs pretty fine if i start PS as local administrator, but when i'm running it through SCCM2012, it fails.
Execute-Process -Path "Setup.exe" -Parameters "/s /v`"/qn INSTALLDIR=\`"$Env:ProgramFiles\Avid\iNEWS4\`"`"" -WindowStyle Hidden -IgnoreExitCodes '3010'
I know that this will work if i remove the "/s", and running through the installation wizar. The issue here, is that during the wizard i get this dialog Box that i needs to click "ok" during manually install, that might cause the problem when SCCM2012 tries to install it.
I do not get the dialogbox while running PS as local admin....

I have tried to use "-verb runas" into the commandline, With no Luck...
Jan 8, 2015 at 8:50 AM
If I understand you correctly, the OK button is called by the setup.exe? In that case, I believe SCCM has no way to show you the prompt as the installation (with admin rights) is executed under system context (= a completely different "user" then is logged on to Windows and tries to install the program/package).
If yes, you may need to prepare the answer file for setup.exe and launch it using the designated command - in that scenario, the installation will be completely silent. At least my experience.
The problem with setup.exe may be you have to figure out which app has been used to prepare the setup.exe wrapper - i.e. InstallShield to name one. If you open setup.exe in Notepad, you may scroll down and find out hardcoded app it has been created with. Or you can use online checker tool:
You can start searching info about creation of the answer files here:

Hope it helps.