-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.bat
31 lines (26 loc) · 935 Bytes
/
init.bat
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
29
30
31
@ECHO OFF
chcp 65001
echo Macros Backup Automatically to OneDrive?
choice
if errorlevel 2 goto :no
if errorlevel 1 goto :yes
:yes
ECHO Enter OneDriveFolderName:
SET INPUT_STR=
SET /P INPUT_STR=
IF "%INPUT_STR%"=="" GOTO :yes
set tf=true
set odpath=%INPUT_STR%
GOTO :regist
:no
set tf=false
set odpath=""
:regist
powershell -executionpolicy RemoteSigned -File %USERPROFILE%\cmd_macros\init.ps1 %tf% "%odpath%"
echo config file is created.
echo if you want to change setting, see config.json.
echo Change Autorun value to "%USERPROFILE%\cmd_macros\macros.bat"
echo or for Anaconda User "%USERPROFILE%\cmd_macros\macros.bat" ^& if exist "%USERPROFILE%\Anaconda3\condabin\conda_hook.bat" "%USERPROFILE%\Anaconda3\condabin\conda_hook.bat"
reg add "HKCU\Software\Microsoft\Command Processor" /v "LastKey" /t REG_SZ /d "delete shitemo iiyo"
start regedit
notepad %USERPROFILE%\cmd_macros\macrolist.bat