-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
install.ps1
21 lines (18 loc) · 700 Bytes
/
install.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This script is just a wrapper to start the Dart executable from the GitHub releases page.
$Dir = "$ENV:APPDATA\NexusTools"
$Arch = $ENV:Processor_Architecture
$BaseUrl = "https://github.com/corbindavenport/nexus-tools"
$Download = "$BaseUrl/releases/latest/download/nexustools-windows-x64.zip"
# Make the new directory
$dirCheck = Test-Path "$Dir"
if ($dirCheck) {
# Do nothing
} else {
# Create folder and hide output
New-Item "$Dir" -ItemType Directory -ea 0 | Out-Null
}
# Start Dart executable
Invoke-WebRequest -Uri "$Download" -OutFile "$Dir\temp.zip"
Expand-Archive -LiteralPath "$Dir\temp.zip" -DestinationPath "$Dir" -Force
del "$Dir\temp.zip"
& "$Dir\nexustools.exe" -i -w