Problem with -NoWait argument for Execute-Process command

Topics: Archive - General
Nov 26, 2013 at 3:27 PM
Someone suggested I move this question to General so here it is.

First off, great work putting this together. It still astonishes me (and frustrates the hell out of me) that Microsoft haven't given us similar functionality 'out of the box' with SCCM.

I tried putting a step in POST-INSTALLATION to launch the program that we just installed. I don't want the script to wait so I tried using -NoWait in the command line. This didn't work. Am I doing something wrong or could this be a bug?

Here is my command:
Execute-Process -FilePath "C:\Program Files\Cisco Systems\Cisco Jabber\CiscoJabber.exe" -NoWait 
Thank you.
Nov 26, 2013 at 3:43 PM
Actually, -NoWait isn't supported on Execute-Process yet. The parameter is there but the feature isn't. Can you submit a feature request and we'll look at it?

In the meantime, you can use this:
[System.Diagnostics.Process]::Start("$envProgramFiles\Cisco Systems\Cisco Jabber\CiscoJabber.exe")
Nov 26, 2013 at 5:35 PM
Thank you for your quick response! I tried your suggestion and I got this error message:

Here's what my code looks like:
$installPhase = "Post-Installation"

    # Launch Jabber
    [System.Diagnostics.Process]::Start("$envProgramFiles\Cisco Systems\Cisco Jabber\CiscoJabber.exe")
Any suggestions?
Nov 26, 2013 at 5:54 PM
I found the problem. The script doesn't like $envProgramFiles. The following command works perfectly for me.
Start-Process -FilePath "C:\Program Files\Cisco Systems\Cisco Jabber\CiscoJabber.exe"