@echo off cd /d "%~dp0" :::::::: Parameters :: Path to Notepad++ Portable set npp_exe=%~dp0Notepad++Portable.exe :: Paths to SendTo and Start Menu for /f "tokens=3*" %%G in ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Start Menu" ^|Find "REG_"') do call set _startmenu=%%H for /f "tokens=2*" %%G in ('REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "SendTo" ^|Find "REG_"') do call set _sendto=%%H :::::::: Install cls echo This script will allow you to 1) install Notepad++ Portable in your SendTo echo Menu; and 2) install Notepad++ Portable in your Start Menu. echo. choice /M Continue if errorlevel 2 goto :eof echo. echo. choice /M "1) Create SendTo Menu shortcut" if errorlevel 2 goto :install_startmenu echo. echo Creating SendTo shortcut... echo Set a = WScript.CreateObject("WScript.Shell")>shortcut.vbs echo Set b = a.CreateShortcut("%_sendto%\Notepad++Portable.lnk")>>shortcut.vbs echo b.TargetPath="%npp_exe%">>shortcut.vbs echo b.Description="Notepad++ Portable">>shortcut.vbs echo b.Save>>shortcut.vbs cscript //B //NoLogo shortcut.vbs del shortcut.vbs echo Done. :install_startmenu echo. choice /M "2) Create Start Menu shortcut" if errorlevel 2 goto :done echo. echo Creating Start Menu shortcut... echo Set a = WScript.CreateObject("WScript.Shell")>shortcut.vbs echo Set b = a.CreateShortcut("%_startmenu%\Notepad++Portable.lnk")>>shortcut.vbs echo b.TargetPath="%npp_exe%">>shortcut.vbs echo b.Description="Notepad++ Portable">>shortcut.vbs echo b.Save>>shortcut.vbs cscript //B //NoLogo shortcut.vbs del shortcut.vbs echo Done. :done echo. pause