We have been working with VSE7 since the day it came out. We have found some issues that NAI is having a hard time addressing (Surprise surprise). We are planning on deploying this package to 5,000 clients so we build a customized package, with there tool, so it will run silently in the background. We started seeing error failed to load VSUtil dll twice whenever it ran. This did not seem to affect the installation or the functionality but it was an error we could do without. We found that if outlook was open during the install, it would generate this error. So I wrote a script that check to see if outlook is open and if so, it tells the user it is going to close outlook in 2 minutes so it can update the virus software. That eliminates the error message. Here is my script:
Dim booloutlook, appoutlook, boolmapi, WshShell, fs
Set WshShell = CreateObject("wscript.shell"
Set fs = CreateObject("Scripting.FileSystemObject"
booloutlook = ProcessIsRunning("outlook.exe"
If booloutlook = "True" Then 'Check to see if outlook is open. If so, close it.
WshShell.Popup "We are about to upgrade your virus software and outlook must be closed during this process. You have two minutes to save all work and close or outlook will close automatically. Thank You.", 20, "McAfee 7.0 Install"
wscript.Sleep 120000 'Sleep for one minute
set appOutlook = Wscript.CreateObject("Outlook.Application"
appOutlook.Quit
Set appOutlook = Nothing
wscript.Sleep 10000
boolmapi = ProcessIsRunning("Mapisp32.exe"
If boolmapi = "True" Then
ProcessTerminate("Mapisp32.exe"
End If
End If
wscript.Sleep 20000 'Sleep for 20 seconds
'wshshell.Run "setup.exe /qb+" 'Install McAfee
Private Function ProcessIsRunning( strProcess )
Dim colProcessList
Set colProcessList = Getobject("Winmgmts:"
.Execquery _
("Select * from Win32_Process Where Name ='" & strProcess & "'"
If colProcessList.Count > 0 Then
ProcessIsRunning = True
Else
ProcessIsRunning = False
End If
Set colProcessList = Nothing
End Function
Private Function ProcessTerminate( strProcess )
Dim colProcessList, objProcess
Set colProcessList = GetObject("Winmgmts:"
.ExecQuery _
("Select * from Win32_Process Where Name ='" & strProcess & "'"
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set colProcessList = Nothing
End Function
Dim booloutlook, appoutlook, boolmapi, WshShell, fs
Set WshShell = CreateObject("wscript.shell"
Set fs = CreateObject("Scripting.FileSystemObject"
booloutlook = ProcessIsRunning("outlook.exe"
If booloutlook = "True" Then 'Check to see if outlook is open. If so, close it.
WshShell.Popup "We are about to upgrade your virus software and outlook must be closed during this process. You have two minutes to save all work and close or outlook will close automatically. Thank You.", 20, "McAfee 7.0 Install"
wscript.Sleep 120000 'Sleep for one minute
set appOutlook = Wscript.CreateObject("Outlook.Application"
appOutlook.Quit
Set appOutlook = Nothing
wscript.Sleep 10000
boolmapi = ProcessIsRunning("Mapisp32.exe"
If boolmapi = "True" Then
ProcessTerminate("Mapisp32.exe"
End If
End If
wscript.Sleep 20000 'Sleep for 20 seconds
'wshshell.Run "setup.exe /qb+" 'Install McAfee
Private Function ProcessIsRunning( strProcess )
Dim colProcessList
Set colProcessList = Getobject("Winmgmts:"
("Select * from Win32_Process Where Name ='" & strProcess & "'"
If colProcessList.Count > 0 Then
ProcessIsRunning = True
Else
ProcessIsRunning = False
End If
Set colProcessList = Nothing
End Function
Private Function ProcessTerminate( strProcess )
Dim colProcessList, objProcess
Set colProcessList = GetObject("Winmgmts:"
("Select * from Win32_Process Where Name ='" & strProcess & "'"
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set colProcessList = Nothing
End Function