close brwoser windows
This commit is contained in:
parent
0fcf232c5d
commit
88358c0640
|
@ -0,0 +1,33 @@
|
|||
Option Explicit
|
||||
KillBrowsers()
|
||||
|
||||
Sub KillBrowsers()
|
||||
'Declare variables
|
||||
Dim i
|
||||
Dim wmiSvc,WQL,Processes,Process
|
||||
Dim arrBrowserProcesses(7)
|
||||
|
||||
'Initialize variables
|
||||
arrBrowserProcesses(0)="iexplore.exe"
|
||||
arrBrowserProcesses(1)="chrome.exe"
|
||||
arrBrowserProcesses(2)="firefox.exe"
|
||||
arrBrowserProcesses(3)="safari.exe"
|
||||
arrBrowserProcesses(4)="opera.exe"
|
||||
arrBrowserProcesses(5)="iron.exe"
|
||||
arrBrowserProcesses(6)="MicrosoftEdge.exe"
|
||||
|
||||
Set wmiSvc = GetObject("winmgmts:\\.\root\cimv2")
|
||||
For i = 0 To UBound(arrBrowserProcesses)
|
||||
wql = "SELECT * FROM Win32_Process WHERE Name='" & arrBrowserProcesses(i) & "'"
|
||||
Set processes = wmiSvc.ExecQuery(wql)
|
||||
Do While processes.Count > 0
|
||||
For Each process In processes
|
||||
process.Terminate
|
||||
Next
|
||||
WScript.Sleep 200
|
||||
Set processes = wmiSvc.ExecQuery(wql)
|
||||
Loop
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
|
@ -63,7 +63,7 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
Winbatch_uninstall_old_64
|
||||
sub_check_exitcode
|
||||
comment "Close the UnInstall Browser Window"
|
||||
DosInAnIcon_taskkill
|
||||
Winbatch_taskkill
|
||||
comment "Force Reboot after driver uninstall"
|
||||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
|
@ -73,7 +73,7 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
Winbatch_uninstall_64
|
||||
sub_check_exitcode
|
||||
comment "Close the UnInstall Browser Window"
|
||||
DosInAnIcon_taskkill
|
||||
Winbatch_taskkill
|
||||
comment "Force Reboot after driver uninstall"
|
||||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
|
@ -87,13 +87,8 @@ endif
|
|||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[DosInAnIcon_taskkill]
|
||||
taskkill /F /IM openwith.exe
|
||||
taskkill /F /IM iexplore.exe
|
||||
taskkill /F /IM iron.exe
|
||||
taskkill /F /IM firefox.exe
|
||||
taskkill /F /IM chrome.exe
|
||||
taskkill /F /IM opera.exe
|
||||
[Winbatch_taskkill]
|
||||
cscript //b //nologo %ScriptPath%\browserkill.vbs
|
||||
|
||||
[Winbatch_uninstall_old_32]
|
||||
"$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
|
|
Loading…
Reference in New Issue