So, I've got this little script that these exact users can use to update their version of AHK. Here it is:
Code: Select all
If (Update() > A_AHKVersion) {
MsgBox, 0x2034
, Update?
, It seems that you are running an outdated version of AHK.`n
. Would you like to update it now?
If (MsgBoxRB("Yes") && (!A_IsAdmin)) {
MsgBox, 0x2001
, Portable install?
, There seems to be a bit of a problem, you aren't an admin of the current system.`n
. Would you like to install the portable download instead?
If (MsgBoxRB("Ok"))
Run % "https://autohotkey.com/download/ahk.zip"
} Else If (MsgBoxRB("Yes")) && (A_IsAdmin)
Run % "https://autohotkey.com/download/ahk-install.exe"
Else If (MsgBoxRB("No"))
ExitApp
}
Update() {
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.Open("GET", "https://autohotkey.com/download/1.1/version.txt", true)
whr.Send()
whr.WaitForResponse()
Return := whr.ResponseText
}
MsgBoxRB(Type) {
IfMsgBox, %Type%
Return True
Else
Return False
}