title: Script to display a pop-up and then kills a windows process
body: <p>I'm trying to deploy an application through SCCM 2012 for Windows7 (x86 and x64) that requires to notify the user that his Microsoft Outlook should be closed before to continue with the installation. It could be either with a Timer or a (Yes / No) choice, then if the user press Yes then it will close Outlook and will continue with the installation otherwise it will send a log file saying the the user cancelled the installation but it can be retried at any time.</p>
  
  <p>So far I just have the installation script that works only to install the applications using a command line script. So, it will just execute some MSI's installations and Windows updates, and then it quits. </p>
  
  <p>The script I have that creates the pop up and that can be called by my CMD file is the following VBScript and was taken from a TechNet article. </p>
  
  <pre><code>Const TIMEOUT = 7
  Set objShell = WScript.CreateObject("WScript.Shell")
  Set objFS = WScript.CreateObject("Scripting.FileSystemObject")
  
  strPath = Wscript.FullName
  strFileVersion = objFS.GetFileVersion(strPath)
  
  iRetVal = objShell.Popup(Wscript.FullName &amp; vbCrLf &amp; _
   "File Version: " &amp; _
   strFileVersion &amp; vbCrLf &amp; _
   "Would you like to close Outlook application and continue with the installation?" _
   ,TIMEOUT,"Outlook Validation",vbYesNo + vbQuestion)
  
  Select Case iRetVal
   Case vbYes
   Set objFile = objFS.GetFile(strPath)
   objShell.Popup WScript.FullName &amp; vbCrLf &amp; vbCrLf &amp; _
   "File Version: " &amp; strFileVersion &amp; vbCrLf &amp; _
   "File Size: " &amp; Round((objFile.Size/1024),2) &amp; _
   " KB" &amp; vbCrLf &amp; _
   "Date Created: " &amp; objFile.DateCreated &amp; vbCrLf &amp; _
   "Date Last Modified: " &amp; objFile.DateLastModified &amp; _
   vbCrLf,TIMEOUT
   Wscript.Quit
   Case vbNo
   Wscript.Quit
   Case -1 
   WScript.StdOut.WriteLine "Popup timed out."
   Wscript.Quit
  End Select
  </code></pre>
  
  <p>So I don't know if there's any useful example that I can use and customize it from there. I'm clueless, blindfolded, I don't see the light. Well you understand my frustration.</p>
  
  <p>Any ideas, examples or links will be really appreciated!!
  Thanks &amp; kind regards.
  Joel.</p>