-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.ps1
28 lines (20 loc) · 1.08 KB
/
run.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
$name = Split-Path -Path $PSCommandPath -Leaf # File Name only
$div = $name.Split('.')[0]
$directorypath = (Get-Item .).FullName
$path = $directorypath + '\Wordler\'
If (!(test-path $path)) { mkdir $path }
$url = 'https://github.com/vesk4000/Wordler/releases/download/v1.2.2/wordlist.txt'
$path_to_file = $directorypath + '\Wordler\wordlist.txt'
Invoke-WebRequest $url -OutFile $path_to_file
$url = 'https://github.com/vesk4000/Wordler/releases/download/v1.2.2/launcher_args.txt'
$path_to_file = $directorypath + '\Wordler\launcher_args.txt'
Invoke-WebRequest $url -OutFile $path_to_file
Add-Content $path_to_file (' -d ' + $div + '/14')
$url = 'https://github.com/vesk4000/Wordler/releases/download/v1.2.2/Wordler.exe'
$path_to_file = $directorypath + '\Wordler\Wordler.exe'
Invoke-WebRequest $url -OutFile $path_to_file
$url = 'https://github.com/vesk4000/Wordler/releases/download/v1.2.2/WordlerLauncher.exe'
$path_to_file = $directorypath + '\Wordler\WordlerLauncher.exe'
Invoke-WebRequest $url -OutFile $path_to_file
Start-Process -FilePath 'Wordler\WordlerLauncher.exe'
stop-process -Id $PID