This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPowercord-v1-Install.ps1
112 lines (63 loc) · 3.38 KB
/
Powercord-v1-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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
clear
echo 'Powercord v1 Windows Installer'
if (Get-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\DiscordCanary' -ErrorAction SilentlyContinue) {
Write-Warning 'Discord canary is installed: Skipping...'
} Else {
Write-Warning 'Discord canary is NOT installed: Installing...'
Wait-Event -SourceIdentifier 001 -Timeout 2
$url = "https://discord.com/api/download/canary?platform=win"
$output = "DiscordCanarySetup.exe"
$start_time = Get-Date
mkdir C:\pstemp -ErrorAction SilentlyContinue
set-location -path C:\pstemp
Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
Invoke-Item "C:\pstemp\DiscordCanarySetup.exe"
Write-Warning "Press any key when DiscordCanary installed"
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Stop-Process -Name DiscordCanary -Force
}
$software = "Node.js";
$installed = (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where { $_.DisplayName -eq $software }) -ne $null
if ($installed) {
Write-Warning 'Node JS is installed: Skipping...'
} Else {
Write-Warning 'Node-JS is NOT installed: Installing...'
Wait-Event -SourceIdentifier 001 -Timeout 2
$url = "https://nodejs.org/dist/v14.15.4/node-v14.15.4-x64.msi"
$output = "Node-jsSetup.msi"
$start_time = Get-Date
mkdir C:\pstemp -ErrorAction SilentlyContinue
set-location -path C:\pstemp
Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
.\Node-jsSetup.msi
Write-Warning "Press any key when Node.js installed"
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
$software = "Git version 2.30.1";
$installed = (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where { $_.DisplayName -eq $software }) -ne $null
if ($installed) {
Write-Warning 'Git Version 2.30.1 is installed: Skipping...'
} Else {
Write-Warning 'Git Version 2.30.1 is NOT installed: Installing...'
Wait-Event -SourceIdentifier 001 -Timeout 2
$url = "https://github.com/git-for-windows/git/releases/download/v2.30.1.windows.1/Git-2.30.1-64-bit.exe"
$output = "Git.exe"
$start_time = Get-Date
mkdir C:\pstemp -ErrorAction SilentlyContinue
set-location -path C:\pstemp
Invoke-WebRequest -Uri $url -OutFile $output
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
.\Git.exe
Write-Warning "Press any key when Node.js installed"
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
set-location -path C:\
git clone https://github.com/aetheryx/aethcord
set-location -path C:\aethcord
npm i
Write-Warning 'Press any key to inject Powercord'
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
npm run plug