-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.bat
19 lines (15 loc) · 900 Bytes
/
create.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@Echo Off
SetLocal DisableDelayedExpansion
mkdir %SystemRoot%\System32\drivers\etc\Ori
mkdir %SystemRoot%\System32\drivers\etc\Af
xcopy %SystemRoot%\System32\drivers\etc\hosts %SystemRoot%\System32\drivers\etc\Ori
xcopy %SystemRoot%\System32\drivers\etc\hosts %SystemRoot%\System32\drivers\etc\Af
SET mypath=%~dp0
::echo %mypath%
::echo %mypath:~0,-1%
xcopy %mypath%revert.bat %SystemRoot%\System32\drivers\etc
xcopy %mypath%revertv2.bat %SystemRoot%\System32\drivers\etc
xcopy %mypath%setting.bat %SystemRoot%\System32\drivers\etc
SCHTASKS /CREATE /SC ONLOGON /TN "HostSetting" /TR "%SystemRoot%\System32\drivers\etc\setting.bat" /RL HIGHEST
SCHTASKS /CREATE /SC DAILY /TN "HostRevert_Day" /TR "%SystemRoot%\System32\drivers\etc\revert.bat" /ST 22:00 /RL HIGHEST
SCHTASKS /CREATE /SC ONLOGON /TN "HostRevert_Sat" /TR "%SystemRoot%\System32\drivers\etc\revertv2.bat" /RL HIGHEST