1 Attachment(s)
MsgBox while Windows update
Hi gurus ;)
I have a serious problem with our javaupdates. To solve it i built a WSUS package and included a vbs script to kill all disturbing processes, which works great. But now I need a MsgBox to have the user confirmed killing his browsers processes or not and interestingly enought it works on a Win vista 32bit mashine. Not on a Win 7 64bit machine.
Code:
On Error Resume Next
'Object declaration
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
' Constante
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
' Bypass IE Zone Security Checking
Set oEnv = objShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
'---------------------------------------------------------------------------------
' BODY
'---------------------------------------------------------------------------------
If MsgBox("Java installieren und alle Browser schließen?", vbQuestion + vbYesNo, "Wichtiges Javaupdate!! by treefish ;)") = vbNo Then
'Befehl zum Beenden des Updates
objShell.Run "net stop wuauserv", 0, True
Else
'Browser und Java werden abgeschossen
objShell.Run "TASKKILL /F /T /IM chrome.exe /IM iexplore.exe /IM java.exe /IM jusched.exe /IM jp2launcher.exe", 0, True
End If
Attachment 31683
Please see my attached file to see the result; the patch just halts and is doing nothing anymore.
Thanks in advance for any help,
Regards,
Bent
Re: MsgBox while Windows update
I notice your first line is On Error Resume next :eek:
This basically tells it that you do not want to know if any errors occur just pretend like they did not happen and keep going. Not a good idea.
Aside from that I assume you mean that your update is hanging and if that be the case why would you think the VB Script is doing it? More likely a problem with the update program.
Although it does look like you are killing a couple of Java related tasks as well so maybe that could be an issue.
Hard to say as I do not do Java and I do not do scripting for stuff like this.
Re: MsgBox while Windows update
why kill java updates in the first place?
Re: MsgBox while Windows update
Interesting article regarding Java from Microsoft’s view point.
Most Java updates don’t remove older versions when updating, leaving a computer vulnerable with the older versions still installed.
http://www.zdnet.com/microsoft-updat...it-7000001650/
Best of luck! :)