@echo off

SETLOCAL

SET ScriptPath=%CD%

SET SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"

ECHO Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
ECHO sLinkFile = "Send to Kobo.lnk" >> %SCRIPT%
ECHO Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
ECHO oLink.TargetPath = "%WINDIR%\system32\CMD.exe" >> %SCRIPT%
ECHO oLink.Arguments = "/U /C ""%ScriptPath%\send2kobo.bat""" >> %SCRIPT%
ECHO oLink.Save >> %SCRIPT%

cscript /nologo %SCRIPT%
DEL %SCRIPT%

MOVE "Send to Kobo.lnk" "%APPDATA%\Microsoft\Windows\SendTo\"


ENDLOCAL