/build/static/layout/Breadcrumb_cap_w.png

KIll the browser window after it launches another browser window in IE

KIll the browser window after it launches another browser window in IE using the following vbscript:

Set oShell = CreateObject("WScript.Shell")
If oShell.AppActivate("type the IE window title you want to close here") Then
WScript.Sleep 500
oShell.SendKeys "%{F4}"
End If
 

Just place the path of the vbscript in the OSD file in the following XML tag:

<DEPENDENCY>
<SCRIPT EVENT="LAUNCH" TIMING="POST" PROTECT="TRUE" WAIT="TRUE">
<SCRIPTBODY>type the name or path to the script here eg. killtask.vbs</SCRIPTBODY>
</SCRIPT>
</DEPENDENCY>

After you launch the appv package, the vbs script will kick in and kill the browser window you defined in the vbscript.

Job done :)


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ