-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy path_Win10-Script-Run.bat
More file actions
69 lines (52 loc) · 2.29 KB
/
_Win10-Script-Run.bat
File metadata and controls
69 lines (52 loc) · 2.29 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@ECHO OFF
:: Version 1.1
:: December 14th, 2017
:: Instructions
:: Bat, Script, and setting MUST be in same Folder
:: Change Option to = one of the listed options (mostly yes or no)
Set Run_Option=0
:: Anything other than following does nothing
:: 0 = Go to Script Menu
:: 1 = Run Script with Settings in Script File
:: 2 = Run Script with Windows Default
:: 3 = Run Script with Your Setting file (Change file name bellow)
:: 4 = Load Script with Windows Default (Does not run)
:: 5 = Load Script with Your Setting file (Does not run)
:: Name of Script File
Set Script_File=Win10-Menu.ps1
:: Name of Setting File (Change Mine.csv to your setting file, if you have one)
Set Setting_File=Mine.csv
:: DO NOT HAVE SPACES IN FILENAME
:: Change these to yes or no
Set Accept_ToS=no
:: no = See ToS
:: yes = Skip ToS (You accepted it)
Set Create_Restore_Point=no
Set Restore_Point_Name=Win10_Initial_Setup_Script
:: DO NOT HAVE SPACES IN NAME
Set Restart_when_Done=yes
:: Update Checks
:: If update is found it will Auto-download and use that (with your settings)
Set Script=no
Set Internet_Check=yes
:: Internet_Check only matters If Script is yes and pings to github.com is blocked
::----------------------------------------------------------------------
:: Do not change unless you know what you are doing
Set Script_Directory=%~dp0
Set Script_Path=%Script_Directory%%Script_File%
:: DO NOT CHANGE ANYTHING PAST THIS LINE
::----------------------------------------------------------------------
SETLOCAL ENABLEDELAYEDEXPANSION
If /i %Run_Option%==1 Set Run_Option=!Run_Option! -run
If /i %Run_Option%==2 Set Run_Option=!Run_Option! -run wd
If /i %Run_Option%==3 Set Run_Option=!Run_Option! -run %Setting_File%
If /i %Run_Option%==4 Set Run_Option=!Run_Option! -load wd
If /i %Run_Option%==5 Set Run_Option=!Run_Option! -load %Setting_File%
If /i %Accept_ToS%==yes Set Run_Option=!Run_Option! -atos
If /i %Create_Restore_Point%==yes Set Run_Option=!Run_Option! -crp %Restore_Point_Name%
If /i %Internet_Check%==no Set Run_Option=!Run_Option! -sic
If /i %Script%==yes Set Run_Option=!Run_Option! -usc
If /i %Restart_when_Done%==no Set Run_Option=!Run_Option! -dnr
echo "Running !Script_File!"
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '!Script_Path!' !Run_Option!" -Verb RunAs
ENDLOCAL DISABLEDELAYEDEXPANSION