-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.ps1
53 lines (33 loc) · 1.43 KB
/
install.ps1
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
# --------- Function section ---------
function Request-User-Input() {
Write-Host -ForegroundColor Red @"
Did you finish all file usages? (y/n)
"@ -NoNewline
$choice = Read-Host
Write-Host ""
IF ($choice.Equals("n")) {
Write-Host -ForegroundColor Yellow "Press Enter to abort...`n"
PAUSE
stop-process -Id $PID
} ELSE {
IF ($choice.Equals("y")) {
Write-Host -ForegroundColor Yellow "Let's go...`n"
} ELSE {
Write-Host -ForegroundColor Yellow "Invalid input.`n"
Request-User-Input
}
}
}
# ----------- Code section -----------
Write-Host -ForegroundColor Yellow @"
--------------------------------------------------------------------------------------------------------
This installation needs to restart explorer.exe and so it will.
"@
Write-Host -ForegroundColor DarkRed -BackgroundColor White @"
----------------------------------------------------------------------------------------------
!! PLEASE MAKE SURE THAT NO FILES ARE BEING COPIED OR USED IN A SIMILAR WAY AT THE MOMENT !!
----------------------------------------------------------------------------------------------
"@
Request-User-Input
PAUSE
.\scriptForInstallation.ps1