Post Install Execute-Process not being executed?

Hello all,

I am exploring using PSADT to deploy a VPN client (Forticlient) that requires post MSI install steps through InTune. It requires us to run an executable file (FCConfig.exe) to import VPN settings and the command:

FCConfig -f settings.xml -m all -o import -q -p somepassword

has been “translated” to this in the Post Install section:

Execute-Process -Path “C:\Program Files\Fortinet\FortiClient\FCConfig.exe” -Parameters “-f settings.xml -m all -o import -q -p somepassword”

However, this never seems to be executed and the settings never applied to the currently logged on user’s registry.

If we run a similar command from a Powershell script that we deploy in Intune, it works:

Start-Process “C:\Program Files\Fortinet\FortiClient\FCConfig.exe” -Wait -ArgumentList ‘-f .\settings.xml -m all -o import -q -p somepassword’

The log file doesn’t mention anything after indicating successful MSI install. It’s as if it never even saw the post install steps.

What could be causing this?

If you launch PSADT via SCCM, PSADT uses the system account. (It uses the Default User hive, btw)

If you can run the post-install configuration as the user and it works, you’ll want to use Set-ActiveSetup to trigger the post-install configuration.

I will look into Set-ActiveSetup.

I’ve since been trying other tests and one of the things I found is that the FCConfig requires admin privileges to run. This is most likely the cause of why the import is not being executed. How do I get Execute-Process to run with admin/elevated privileges?

Finally cracked it …

This doesn’t work:

Execute-Process -Path “C:\Program Files\Fortinet\FortiClient\FCConfig.exe” -Parameters “-f settings.xml -m all -o import -q -p somepassword”

But this does:

Execute-Process -Path ‘C:\Program Files\Fortinet\FortiClient\FCConfig.exe’ -Parameters “-f `”$dirSupportFiles\settings.xml`" -m all -o import -q -p somepassword"

I decided to put the XML in the SupportFiles folder and used the same format as the Office2013 example included in the PSADT package to call it.

I don’t really get why it would work with the latter but not the former. If I were to hazard a guess, it may be because when we call Execute-Process, the location of the PSADT folder gets lost so just specifying the filename or even prepending it with a .\ will not work?

Anyway, hopefully this will help someone else out there.

I think PSADT defaults to the \files\ folder when no path is specified.

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