Administrator draww Posted April 20, 2014 Administrator Share #1 Posted April 20, 2014 If you're using TeamViewer for remote accessing your computers you face this ugly nag every time your session exceeds 60 seconds. So with the help of VB scripting, we can close this window automatically. You can create some file called teamviewer_kill.vbs with given code or download it from the links. The idea is simple:Loop infinitely every one second to find the target window.If it is there send TAB-TAB-ENTER (this will lead to OK button). Sending Alt+F4 is not working. You must click OK button.You can change the interval by changing "WScript.Sleep 1000" to whatever you like (only change 1000 to any number - it's in milliseconds).If you put it under your Startup folder, it will run every time you log in.If you're using a localized version, change "Sponsored session" text to match your window title. You must keep quotation marks! Code: 'DrAww AliEn (c) 2014 'Find TeamViewer sponsored session window and click OK Set objShell = CreateObject("WScript.Shell") Do ret = objShell.AppActivate("Sponsored session") If ret = True Then objShell.SendKeys "{TAB}{TAB}{ENTER}" End If WScript.Sleep 1000 Loop Download: https://mega.co.nz/#!ZMBwSbCI!SYM6PoLpkRVkdgknoUdaC-0gtTLQisVg4aQk3ALXVr0 http://www.solidfiles.com/d/f517273c10/sponsor_kill.rarHope you find it useful 4 Link to comment
SuperModerator BamSec1 Posted May 29, 2014 SuperModerator Share #3 Posted May 29, 2014 Tested ... nice script which does the job!This comes in handy because I am using TV almost every single day to help a few friends. Thanks much bro. 2 Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now