close brwoser windows
This commit is contained in:
parent
3db3113d72
commit
476dbe90d6
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
|
||||||
|
|
@ -75,6 +75,10 @@ else
|
|||||||
ChangeDirectory "%SCRIPTPATH%"
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_32
|
Winbatch_install_32
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
|
|
||||||
|
comment "Disables the pop-up browser window"
|
||||||
|
Winbatch_killtasks_32
|
||||||
|
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
Files_install_32 /32Bit
|
Files_install_32 /32Bit
|
||||||
comment "Patch Registry"
|
comment "Patch Registry"
|
||||||
@ -89,6 +93,10 @@ else
|
|||||||
ChangeDirectory "%SCRIPTPATH%"
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_64
|
Winbatch_install_64
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
|
|
||||||
|
comment "Disables the pop-up browser window"
|
||||||
|
Winbatch_killtasks_64
|
||||||
|
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
Files_install_64 /64Bit
|
Files_install_64 /64Bit
|
||||||
comment "Patch Registry"
|
comment "Patch Registry"
|
||||||
@ -102,6 +110,9 @@ endif
|
|||||||
[Winbatch_install_32]
|
[Winbatch_install_32]
|
||||||
"$Install32Exe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES /NORUN /LOADINF="$IniCfgFile$" /Dir="$InstallDir32$"
|
"$Install32Exe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES /NORUN /LOADINF="$IniCfgFile$" /Dir="$InstallDir32$"
|
||||||
|
|
||||||
|
[Winbatch_killtasks_32]
|
||||||
|
cscript /b /nologo %ScriptPath%\browserkill.vbs
|
||||||
|
|
||||||
[Files_install_32]
|
[Files_install_32]
|
||||||
; copy the ini file to the InstallDir
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir32$"
|
copy "$IniCfgFile$" "$InstallDir32$"
|
||||||
@ -113,6 +124,9 @@ copy "$IniCfgFile$" "$InstallDir32$"
|
|||||||
[Winbatch_install_64]
|
[Winbatch_install_64]
|
||||||
"$Install64Exe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES /NORUN /LOADINF="$IniCfgFile$" /Dir="$InstallDir64$"
|
"$Install64Exe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES /NORUN /LOADINF="$IniCfgFile$" /Dir="$InstallDir64$"
|
||||||
|
|
||||||
|
[Winbatch_killtasks_64]
|
||||||
|
cscript /b /nologo %ScriptPath%\browserkill.vbs
|
||||||
|
|
||||||
[Files_install_64]
|
[Files_install_64]
|
||||||
; copy the ini file to the InstallDir
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir64$"
|
copy "$IniCfgFile$" "$InstallDir64$"
|
||||||
|
Loading…
Reference in New Issue
Block a user