Conferencing add-in uninstall, trying to close Outlook. Script and permission problems with SCCM 2007?
Im trying to uninstall Communicator 2007, Live Meeting 2007, Live Meeting Outlook Conferencing add-in and then install Lync 2010 or 2013.
The problem I have is closing Outlook 2010 so the Conferenceing add-in can be uninstalled.
Lync 2010 has en exe installer that does all this automagically. But I have also made a vbscripts that does it just as good.
My problem is that when I run this with SCCM Outlook doesn't close, so the Conferencing add-in cant be uninstalled. Same problem with both the script and the Lync 2010 setup exe. When I run them manually everything works just fine.
To me it looks like a permission problems with the system account, but I have tested running both script and exe in a task sequence with my admin accounts and it doesnt make any difference. No errors but Outlook just wont close.
What am I missing?
Just a thought... could you use pskill.exe in your script to force Outlook to close, and then run the uninstaller? Doesn't tell you why its failing but maybe a viable workaround?
Yes I think so! I have tested taskkill and that works. I have skipped the graceful exit and made a new terminate script and that is working aswell. Looks like SCCM doesnt allow the script i posted earlier.
I guess no more Mr Niceguy. :) - nizzon 9 years ago
Silly question, you did run the advert as Admin?
My VB sucks, but test your script to make sure it terminates other users threads as well.
ie. Outlook.exe thread for me, Outlook.exe thread for you.
Could just be looking for Outlook.exe in the SYSTEM threads.
Is threads even the right word, maybe I should use process, anyway you know what I mean.
Theres another fella here whos really good at VB, so he will be able to help.
If you mean the Package Program, yes I have that set to "Run with Administrative rights".
I dont know how to set administrative rights on Advertisement?
The problem shouldnt be the VBscript since the EXE from MS has the same problem, right?
Also... there is only one outlook.exe process running as far as I can see. My script and EXE works 100% every time I run them manually, and never when ran through SCCM.
Same clients, same scenarios.
Yeah, Package Program, not advert sorry.
Re: Process. Start Outlook.exe and yourself, then start it another user so you have 2 proccess of Outlook.exe running. This is to check the the VB can close both process with no problem. This in essence is to check that when running as SYSTEM, it is able to close Outlook.exe processes running as other users. Hope you get what I mean.
Re: Lync, that exe might just be a wrapper for the MSI. Check the event log for MSI logs, it will tell you if there was anything wrong. I suspect it will be moaning about a process running.
In the past if I did a upgrade or whatever and use the MSI switch /qn it would just kill the process. Where as if you use /qb (basic GUI) it will prompt the user - you dont want to use /qb, really ugly.
Your on the right path with the VB though. I friend passed me a VB script for killing IE, will see if I can dig it up tonight when Im home so you can compare. - rileyz 9 years ago
I dont really understand how I am supposed to start two Outlook.exe. (Outlook 2010).
I dont want to kill Outlook since it can cause problems with PSTs etc.
Im using this script to close it... (if i understand it right it should close multiple instances)
Function IsProcessRunning( strServer, strProcess )
Dim Process, strObject
IsProcessRunning = False
strObject = "winmgmts://" & strServer
For Each Process in GetObject( strObject ).InstancesOf( "win32_process" )
If UCase( Process.name ) = UCase( strProcess ) Then
IsProcessRunning = True
End Function On Error Resume Next Dim strComputer, strProcess strProcess = "OUTLOOK.EXE"
strComputer = "." If( IsProcessRunning( strComputer, strProcess ) = True ) Then Set Outlook = GetObject(, "Outlook.Application")
If Err = 0 Then
'MsgBox "Outlook is not running" End If
Ohh, your doing a graceful exit, very nice you!
Re: starting two outlooks. Create UserA and UserB. Login as both to create profiles to clear out no profile issues. Login as UserA and start Outlook as normal. Start the the second outlook as UserB by going to the exe in program files, right click the exe while holding shift. This will allow you to run as diff user. (assumming you are on Win7)
I guess this will test if it can close another process running outlook as another user.
Dont know if it will fix your problem though, I was thinking you were killing the process - not graceful exit.
Plan B: really ugly and takes ages to get compliance, but you could set the advert to run when no user is logged on thru SCCM. - rileyz 9 years ago