-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.bat
23 lines (16 loc) · 982 Bytes
/
setup.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
where node > tmpFile
SET /p node_path= < tmpFile
DEL tmpFile
SET mypath=%~dp0
SET copyPath=%mypath%command\copy.js
SET toggleUpload=%mypath%command\toggle_upload.js
REN %mypath%\server\config.json.example config.json
REN %mypath%\command\config.json.example config.json
::Create context menu reg key
reg add "HKEY_CLASSES_ROOT\*\shell\Copy Share URL\command" /f /ve /d "\"%node_path%\" \"%copyPath%\" \"%%1""
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Toggle Upload\command" /f /ve /d "\"%node_path%\" \"%toggleUpload%\""
:: Create startup script
echo cd /d "%mypath%" > "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ifs.bat"
echo cd server >> "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ifs.bat"
echo pm2 start dist/server.js --name instant-file-share --interpreter=node --watch >> "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ifs.bat"
npm i -g pm2