• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1114
  • Last Modified:

deploying a custom msi file using sccm

we have a custom mis file to upgrade the citrix ica client. we want to make sure the client processes are not running when the upgrade starts so we want to kill the processes. we tried using a batch file but straight forward commands like xcopy and .msi are  not running. i want to be able to do the followinf

kill 3 processes. i was trying to copy a tool called pskill on the local client called a windows batch file but it is not copying the files.

secondly i want to display a message to the users that an upgrade is going on and asking then not to open the client process for some time

thirdly i want to run the msi. i must kill the processes if not the upgrade will fail. the message also is important. need help.

1 Solution
I've attached a VBscript which should be saved *.vbs. You have execute this Script as command in your sccm program command line (best with: wscript.exe install.vbs). The script will kill processA, processB and processC and then will execute the .msi. Please just customize for your needs.
The message for the user, that a upgrade is in progress cannot be dont from within the script, as the command is executed in "local system" user context. So all message will never be visible for the logged on users.
SCCM delivers the possibiliy to display a message during installation, so why don't you use this one?
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & "." & "\root\cimv2") 
Set objShell = CreateObject("Wscript.Shell")


strMSI = "MSI2Execute.msi"

On Error Resume Next
objShell.Run objShell.ExpandEnvironmentStrings("%WINDIR%") &"\System32\msiexec /I " &strMSI &" /qb-!",1,true
On Error Goto 0

Sub KillProcess(strProcess)
On Error Resume Next
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " & strProcess)
For Each objProcess in colProcess
On Error Goto 0
End Sub

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now