Skip to content

Instantly share code, notes, and snippets.

@p4ul
Created October 12, 2011 22:25
Show Gist options
  • Save p4ul/1282840 to your computer and use it in GitHub Desktop.
Save p4ul/1282840 to your computer and use it in GitHub Desktop.
use this with my teamviewer:// protocol hander
@echo off
REM place this in C:\ and install teamviewer.reg below. Then you should be able to
REM openteamviewers from the webbrowser with teamviewer://1234
set protocolString=%1
REM uncomment below for testing
REM set protocolString="teamviewer://795143153"
set protocolString=%protocolString:"=%
if "%protocolString:~22,1%"=="/" goto sub_sixtyfour
:sub_normal
echo normal
set protocolString=%protocolString:~13,10%
goto:end_setting
:sub_sixtyfour
echo sixty four
set protocolString=%protocolString:~13,9%
:end_setting
echo finished setting vars
echo %protocolString%
REM you may need to change this location
"C:\Program Files (x86)\TeamViewer\Version7\TeamViewer.exe" -i %protocolString% --Password hard24get
pause
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\teamviewer]
@="URL:teamviewer teamviewer"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\teamviewer\DefaultIcon]
@="Teamviewer.exe,1"
[HKEY_CLASSES_ROOT\teamviewer\shell]
[HKEY_CLASSES_ROOT\teamviewer\shell\open]
[HKEY_CLASSES_ROOT\teamviewer\shell\open\command]
@="\"C:\\teamviewer.bat\" \"%1\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment