-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.ps1
More file actions
27 lines (21 loc) · 866 Bytes
/
debug.ps1
File metadata and controls
27 lines (21 loc) · 866 Bytes
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
Stop-Process -Name Notepad -ErrorAction SilentlyContinue;
Write-Host "Terminated Notepad";
regsvr32 /u "C:\Users\User\Desktop\ainuKey\ainuKey.dll" /s
Write-Host "Unregistered ainuKey.dll";
$dir = "C:\Users\User\Desktop\ainuKey"
if (!(Test-Path $dir)) {
New-Item -ItemType directory -Path $dir
Write-Host "Created directory $dir"
}
& "C:\Program Files (x86)\IObit\IObit Unlocker\IObitUnlocker.exe" /Delete /Advanced "$dir\ainuKey.dll"
TimeOut 1
taskkill /IM IObitUnlocker.exe
Write-Host "Deleted ainuKey.dll from $dir\ainuKey.dll"
TimeOut 1
Copy-Item -Path $PSScriptRoot\zig-out\lib\ainuKey.dll -Destination $dir -Force
Write-Host "Copied ainuKey.dll to $dir\ainuKey.dll"
regsvr32 "C:\Users\User\Desktop\ainuKey\ainuKey.dll" /s
Write-Host "Registered ainuKey.dll";
TimeOut 2
Start-Process "C:\Windows\System32\notepad.exe"
Write-Host "Started Notepad";