-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstall.bat
More file actions
28 lines (21 loc) · 927 Bytes
/
Install.bat
File metadata and controls
28 lines (21 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@echo off
set exe_path="%~dp0Release\CopyPath.exe"
if not exist %exe_path% (
echo %exe_path% not found.
echo Please build the solution with release configuration,
echo or modify this script to point to an existent executable file.
echo Install failed.
goto :end
)
set reg_path=HKEY_CURRENT_USER\Software\Classes
reg add %reg_path%\*\shell\CopyPath /f /ve /d "Copy path"
reg add %reg_path%\*\shell\CopyPath\command /f /ve /d "%exe_path% -p \"%%1\""
reg add %reg_path%\*\shell\CopyName /f /ve /d "Copy name"
reg add %reg_path%\*\shell\CopyName\command /f /ve /d "%exe_path% -n \"%%1\""
reg add %reg_path%\Folder\shell\CopyPath /f /ve /d "Copy path"
reg add %reg_path%\Folder\shell\CopyPath\command /f /ve /d "%exe_path% -p \"%%1\""
reg add %reg_path%\Folder\shell\CopyName /f /ve /d "Copy name"
reg add %reg_path%\Folder\shell\CopyName\command /f /ve /d "%exe_path% -n \"%%1\""
echo Install succeeded.
:end
pause