Run/Start Application Post Installation

How can I start the application once installed using the Post-Installation area in PSADT? I will be using SCCM to install.

Your best bet is Start-Process. Do get-help start-process for more info. This is part of PoSh core, not an addon from PSADT.

I thought I tried start-process in the past but failed to start but I will give it another go.

Start-process if run with sccm will run it as system so if application needs logon then that will not work properly. You can run the command to schedule the task

1 Like

You need to use execute-processasuser this will do what you want but under the current logged on user unless you specify the user you want

1 Like

What bwsanders stated is the way to go since ConfigMgr runs processes as SYSTEM by default. Plus the function gets logged in PSADT whereas Start-Process does not. But this is only the case when using a machine wide install for all users. When the installation behavior to install as user is needed, then Execute-Process works, whereas Execute-ProcessAsUser does not.

You can just use Execute-Process with -NoWait parameter. The toolkit will start the process but then it will just continue executing the script and closing.

execute-process doesn’t support -wait, start-process does.