close brwoser windows
This commit is contained in:
33
CLIENT_DATA/browserkill.vbs
Normal file
33
CLIENT_DATA/browserkill.vbs
Normal file
@@ -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
|
||||
|
||||
@@ -82,12 +82,7 @@ msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
||||
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_killtasks_32]
|
||||
; %ScriptPath%\X86\closewindow.exe "Before you go" ""
|
||||
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
|
||||
cscript //b //nologo %ScriptPath%\browserkill.vbs
|
||||
|
||||
[Files_uninstall_32]
|
||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||
@@ -101,12 +96,7 @@ msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
||||
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_killtasks_64]
|
||||
; %ScriptPath%\X86\closewindow.exe "Before you go" ""
|
||||
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
|
||||
cscript //b //nologo %ScriptPath%\browserkill.vbs
|
||||
|
||||
[Files_uninstall_64]
|
||||
; Example for recursively deleting the installation directory:
|
||||
|
||||
Reference in New Issue
Block a user