Jump to content


  • 0
ecornwell

Application Requires other software Not Running to Install

Question

Hello,

 

I'm a frequent visitor but first time poster, I love this site!

 

I have an application that requires that certain other applications aren't running or it won't install. (It doesn't seem to be consistent across versions for upgrades.) I've got the application built in SCCM 2012 and it works great on new deployments. What's the easiest way to get around the other programs running and the install failing? I need to push this out to about 100 PC's most of which have various versions installed that will be upgraded. If any of them have Outlook, Excel, Powerpoint, or IE running, it won't install.

 

Thanks!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello,

 

I don't know if this is the best solution but I can tell you how would I do it.

1. Identify all the exe files of all your applications and write them in a text file, each exe file on a separate row). This will help you later to maintain the script. Or just add the lines in the same script, will be easier to manage the download to every machine.

2. Create a vbs script which reads the file line by line in a loop, and checks if that exe is running. You will find many examples on how to script that. Below one of them

 

Dim Process, strObject, strProcess

Const strComputer = "."

strProcess = "OUTLOOK.exe"

IsProcessRunning = False

strObject = "winmgmts://" & strComputer

For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )

If UCase( Process.name ) = UCase( strProcess ) Then

MsgBox "Outlook is running"

End If

Next

 

3. Make the vbs to exit with 0 if everything is OK or exit with an error code if a process is running.

4. Execute the vbs in a task sequence before the actual installation of the software.

5. Set to fail the task sequence if the execution of vbs fails (exits with anything else than 0)

 

Hope this helps you.

Share this post


Link to post
Share on other sites

  • 0

Hi,

I would use a vbs wrapper script as well to handle that, there are som different approaches you could go for, either simply fail the application if a process is already running or prompt the user as was suggested above..

 

Here is examples of both:

http://ccmexec.com/2011/08/fail-a-task-sequence-or-program-if-a-process-is-running/

http://ccmexec.com/2011/09/allow-the-user-to-postpone-installation-in-sccm/

There are many more examples out there as well on .HTA e.t.c that will do the same.

regards,

Jörgen

Share this post


Link to post
Share on other sites

  • 0

Thank you both for responding. Shortly after posting this, a coworker came up with an idea. We added a custom requirement to the Deployment that does a WMI check for the process. We've done a little bit of testing with it and it seems to work pretty good. The deployment doesn't start until the processes aren't running.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.