how does the script handle if program is running on target client?

Topics: Archive - General
Apr 2, 2014 at 1:39 PM
Hi

If I want to upgrade Itunes for instance..
I create a new script etc. and deploy it to my itunes collection..

How does the script and/or sccm handle if Itunes is already running on a client?
Coordinator
Apr 2, 2014 at 8:43 PM
Hi,

Show-InstallationWelcome -CloseApps "iTunes.exe" will prompt user to close iTunes. Refer to documentation for more details.

Sean
Apr 2, 2014 at 8:51 PM
Hi Sean

Thanks.. I'll reread the docs..
if show-installationWelcome is only activated if process is running then I'll use that..
if not.. I might just use:

$ProcessActive = Get-Process outlook -ErrorAction SilentlyContinue
if($ProcessActive -eq $null)
{

Do my installation of itunes

}
else
{

Show-InstallationWelcome -CloseApps "iTunes.exe" etc etc

}
Coordinator
Apr 2, 2014 at 9:44 PM
Hi,

Yes, the prompt will only be activated if the process is running (unless you add the -AllowDefer parameter). If you don't want a prompt and just want to kill the process, you can use:

Show-InstallationWelcome -CloseApps "itunes.exe" -Silent

Cheers,
Seán