-
Notifications
You must be signed in to change notification settings - Fork 0
/
arrpc_start.ahk
30 lines (25 loc) · 960 Bytes
/
arrpc_start.ahk
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
/************************************************************************
* @description Start arRPC in background to autostart it
* @author Maicol Battistini
* @date 2024/10/01
* @version 1.0.0
***********************************************************************/
#Requires AutoHotkey >=2.0
#NoTrayIcon
; If Dorion or Discord are running, close and restart them
DorionPath := "C:\Program Files\Dorion"
if (FileExist(DorionPath "\Dorion.exe") && ProcessExist("Dorion.exe")) {
ProcessClose "Dorion.exe"
Run "Dorion.exe", DorionPath
}
DiscordPath := EnvGet("LocalAppData") "\Discord"
if (FileExist(DiscordPath "\Discord.exe") && ProcessExist("Discord.exe")) {
ProcessClose "Discord.exe"
Run "Discord.exe", DiscordPath
}
ArrpcPath := EnvGet("Userprofile") "\arrpc"
If (ProcessExist("node.exe"))
path := ProcessGetPath("node.exe")
if (InStr(path, ArrpcPath))
ProcessClose "node.exe"
Run "node src", ArrpcPath, "Hide"