-
August 16th, 2013, 07:36 AM
#1
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
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
-
August 16th, 2013, 04:13 PM
#2
Re: MsgBox while Windows update
I notice your first line is On Error Resume next
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.
Always use [code][/code] tags when posting code.
-
August 17th, 2013, 07:33 PM
#3
Re: MsgBox while Windows update
why kill java updates in the first place?
-
August 18th, 2013, 03:06 AM
#4
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|