vanheartnet

Valorant Tool

Oct 14th, 2020 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.94 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Portable Valorant © VANHEARTNET
  4. ;@Ahk2Exe-Set FileVersion, 1.4.0.0
  5. ;@Ahk2Exe-SetInternalName Portable Valorant
  6. ;@Ahk2Exe-SetName Valorant
  7. ;@Ahk2Exe-SetOrigFileName Portable Valorant
  8. ;@Ahk2Exe-Set ProductName, Portable Valorant-NoBoot
  9. ;@Ahk2Exe-Set ProductVersion, 1.4.0.0
  10. ;@Ahk2Exe-Set Description, Portable Valorant
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12. ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
  13. ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
  14. ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
  15. ;@Ahk2Exe-SetMainIcon icon.ico
  16. ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
  17. ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
  18. ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
  19. ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
  20.  
  21.  
  22. #SingleInstance,Ignore
  23. #Persistent
  24. #NoEnv
  25. Menu,tray, NoStandard
  26. Menu, Tray, Tip, PORTABLE VALORANT
  27. Menu, Tray, Add, Exit1
  28. SetWorkingDir, %A_ScriptDir%
  29. SetBatchLines, 20ms
  30. #MaxHotkeysPerInterval 99000000
  31. #HotkeyInterval 99000000
  32. #KeyHistory 0
  33. ListLines Off
  34. Process, Priority, , A
  35. SetKeyDelay, -1, -1
  36. SetMouseDelay, -1
  37. SetDefaultMouseSpeed, 0
  38. SetWinDelay, -1
  39. SetControlDelay, -1
  40. DetectHiddenWindows, On
  41. SetTitleMatchMode, 3
  42. SendMode Input
  43.  
  44. if not A_IsAdmin
  45. {
  46. Run, *RunAs "%A_ScriptFullpath%"
  47. ExitApp
  48. }
  49. StringReplace,VGPath,A_ScriptFullPath,\%A_ScriptName%,,All
  50.  
  51. IfNotExist,%A_Temp%\reg
  52. FileCreateDir,%A_Temp%\reg
  53. FileInstall,valwallpaper.jpg,%A_Temp%\reg\valwallpaper.png,1
  54. FileInstall,vgc1.reg,%A_Temp%\reg\vgc1.reg
  55. FileInstall,vgk1.reg,%A_Temp%\reg\vgk1.reg
  56. Gui,VAL:Color,333333
  57. Gui,VAL:Add,Picture,x0 y0 w500 h200,%A_Temp%\reg\valwallpaper.png
  58. Gui,VAL:Add,Groupbox,x240 y5 w250 h180,
  59. Gui,VAL:Add,Button,x260 y20 w100 h30 Center gDelete_Data,Delete Data
  60. Gui,VAL:Add,Button,x+20 y20 w100 h30 Center gDelete_Folders,Delete Folders
  61. Gui,VAL:Add,Button,x260 y+10 w220 h40 Center gLauncher,Launch Portable
  62. Gui,VAL:Add,Button,x260 y+20 w100 Center gMKLink,Create MKLink
  63.  
  64. Gui,VAL:Add,Button,x260 y+5 w100 Center gCreate_Launcher,Create Shortcut
  65. Gui,VAL:Add,Button,x+20 y120 w100 Center gTut,TUTORIAL
  66. Gui,VAL:Add,Button,x380 y148 w100 Center gStartServices,Start Services
  67. Gui,VAL:Add,Button,x50 y70 w150 Center gSERV,Move VG
  68. Gui,VAL:Add,Button,x50 y+5 w150 Center gSTOP,Exit Vanguard
  69. Gui,VAL:Add,Button,x50 y+5 w150 Center gSTOP_VGK,STOP VGK
  70. Gui,VAL:Add,Button,x50 y+5 w150 Center gSTART_VGK,START VGK
  71. Gui,VAL:Font,Bold
  72.  
  73. Gui,VAL:Add,Text,x48 y5 c888888 BackgroundTrans,Created by: VANHEARTNET
  74. Gui,VAL:Add,Text,x51 y5 c666666 BackgroundTrans,Created by: VANHEARTNET
  75. Gui,VAL:Add,Text,x50 y5 cLime BackgroundTrans,Created by: VANHEARTNET
  76. Gui,VAL:Show,% " w" 500 " h" 200,`t Valorant Tool-NoBoot
  77. return
  78.  
  79. STOP_VGK:
  80. Gui,VAL:+OWndialogs
  81. MsgBox, 262180, Warning, Are you sure you want to Disable vgk.sys on your startup system?
  82. IfMsgBox, Yes
  83. {
  84. Run, *RunAs cmd.exe /c net stop vgc,,Hide
  85. Process,close,vgtray.exe
  86. Process,close,vgc.exe
  87. Run, *RunAs cmd.exe /c net stop vgk,,Hide
  88. Sleep, 100
  89. Run, *RunAs cmd.exe /c sc config vgk start= demand,,Hide
  90. MsgBox, 262208, Message, Success!`n`nYou need to reboot to apply changes.
  91. }
  92. return
  93.  
  94. START_VGK:
  95. Gui,VAL:+OWndialogs
  96. Run, *RunAs cmd.exe /c net stop vgc,,Hide
  97. Process,close,vgtray.exe
  98. Process,close,vgc.exe
  99. Run, *RunAs cmd.exe /c net stop vgk,,Hide
  100. Sleep, 100
  101. Run, *RunAs cmd.exe /c sc config vgk start= system,,Hide
  102. MsgBox, 262208, Message, Success!`n`nYou need to reboot to apply changes.
  103. return
  104.  
  105.  
  106. STOP:
  107. Gui,VAL:+OWndialogs
  108. Run, *RunAs cmd.exe /c net stop vgc,,Hide
  109. Sleep 100
  110. Process,close,vgc.exe
  111. Process,close,vgtray.exe
  112. MsgBox, 262208, Message, Done!
  113. return
  114. SERV:
  115. Gui,VAL:+OWndialogs
  116. MsgBox, 36, Warning, Do you want to move Vanguard Installation path to This Directory?
  117. IfMsgBox,Yes
  118. {
  119. IfExist,C:\Program Files\Riot Vanguard
  120. FileRemoveDir,C:\Program Files\Riot Vanguard,1
  121. VGPath1=`"%VGPath%\Vanguard\Riot Vanguard\vgc.exe`"
  122. VGPath2=\??\%VGPath%\Vanguard\Riot Vanguard\vgk.sys
  123. VGPath3=`"%VGPath%\Vanguard\Riot Vanguard\vgtray.exe`"
  124. VGPath4=`"%VGPath%\Vanguard\Riot Vanguard\vgc.ico`"
  125. VGPath5=%VGPath%\Vanguard\Riot Vanguard
  126. VGPath6=`"%VGPath%\Vanguard\Riot Vanguard\uninstall.exe`"
  127. VGPath7=%VGPath%\Vanguard\Riot Vanguard\vgtray.exe
  128. VGPath8=Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
  129.  
  130. RegRead,VG1,HKLM,SYSTEM\CurrentControlSet\services\vgc,ImagePath
  131. RegRead,VG2,HKLM,SYSTEM\CurrentControlSet\services\vgk,ImagePath
  132. RegRead,VG4,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,DisplayIcon
  133. RegRead,VG5,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,InstallLocation
  134. RegRead,VG6,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,UninstallString
  135. RegRead,VG7,HKCR,Local Settings\Software\Microsoft\Windows\Shell\MuiCache,%VPath7%
  136. RegRead,VG8,HKCU,Software\Microsoft\Windows\CurrentVersion\Applets\Regedit,LastKey
  137.  
  138. if(VG1!=VGPath1)
  139. RegWrite,REG_EXPAND_SZ,HKLM,SYSTEM\CurrentControlSet\services\vgc,ImagePath,%VGPath1%
  140. if(VG2!=VGPath2)
  141. RegWrite,REG_EXPAND_SZ,HKLM,SYSTEM\CurrentControlSet\services\vgk,ImagePath,%VGPath2%
  142. if(VG4!=VGPath4)
  143. RegWrite,REG_EXPAND_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,DisplayIcon,%VGPath4%
  144. if(VG5!=VGPath5)
  145. RegWrite,REG_EXPAND_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,InstallLocation,%VGPath5%
  146. if(VG6!=VGPath6)
  147. RegWrite,REG_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,UninstallString,%VGPath6%
  148. if(VG7!=VGPath7)
  149. RegWrite,REG_SZ,HKCR,Local Settings\Software\Microsoft\Windows\Shell\MuiCache,%VGPath7%
  150. if(VG8!=VGPath8)
  151. RegWrite,REG_SZ,HKCU,Software\Microsoft\Windows\CurrentVersion\Applets\Regedit,LastKey,%VGPath8%
  152.  
  153. MsgBox, 262208, Message, Moving Complete!
  154. }
  155. return
  156.  
  157. StartServices:
  158. Gui,VAL:+OWndialogs
  159. Process,close,vgc.exe
  160. IfExist,C:\Program Files\Riot Vanguard
  161. FileRemoveDir,C:\Program Files\Riot Vanguard,1
  162. Run *RunAs cmd.exe /c mklink /j "C:\Program Files\Riot Vanguard" "`%CD`%\Vanguard\Riot Vanguard",,Hide
  163. Run regedit.exe /s "%A_Temp%\reg\vgk1.reg"
  164. Run regedit.exe /s "%A_Temp%\reg\vgc1.reg"
  165. Sleep 20
  166. Run, *RunAs cmd.exe /c sc create vgk binpath= "C:\Program Files\Riot Vanguard\vgk.sys" type= Kernel start= system error= Ignore ,,Hide
  167. sleep 20
  168. Run, *RunAs cmd.exe /c sc create vgc binpath= "C:\Program Files\Riot Vanguard\vgc.exe" type= own start= demand error= Ignore ,,Hide
  169. sleep 1000
  170. sleep 10
  171. Run, *RunAs cmd.exe /c sc config vgk start= system,,Hide
  172. sleep 10
  173. Run, *RunAs cmd.exe /c sc config vgc start= demand,,Hide
  174. MsgBox, 262208, Message,Copy Dependencies Complete! `n`nPlease Restart your PC!
  175. return
  176. Tut:
  177. Run https://youtu.be/o1EtXFr7vkU
  178. Run https://youtu.be/pwUtVxvk5eo
  179. return
  180.  
  181.  
  182. MKLink:
  183. Gui,VAL:+OWndialogs
  184. IfExist,C:\Riot Games
  185. FileRemoveDir,C:\Riot Games,1
  186. IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
  187. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
  188. IfExist,C:\ProgramData\Riot Games
  189. FileRemoveDir,C:\ProgramData\Riot Games,1
  190.  
  191. IfExist,Portable Valorant\Riot Games
  192. MsgBox, 262208, Message, Success!!! Thank You!
  193. else
  194. {
  195. MsgBox, 262160, Error, Some files are missing or moved. Riot Games Folder.
  196. return
  197. }
  198.  
  199. Run *RunAs cmd.exe /c mklink /j "C:\Riot Games" "`%CD`%\Portable Valorant\Riot Games" && mklink /j "C:\Users\%A_UserName%\AppData\Local\Riot Games" "`%CD`%\Portable Valorant\Appdata\Riot Games" && mklink /j "C:\ProgramData\Riot Games" "`%CD`%\Portable Valorant\Programdata\Riot Games" && mklink /j "C:\Program Files\Riot Vanguard" "`%CD`%\Vanguard\Riot Vanguard",,Hide
  200.  
  201. return
  202. Launcher:
  203. Gui,VAL:+OWndialogs
  204. IfExist,Portable Valorant.exe
  205. Run *RunAs cmd.exe /c "Portable Valorant.exe",,Hide
  206. else
  207. MsgBox, 16, Error, Portable Valorant.exe is Missing!
  208. return
  209.  
  210. Delete_Folders:
  211. Gui,VAL:+OWndialogs
  212. MsgBox, 36, Warning, Are you sure you want to Delete Riot Vanguard and Valorant Folders?`n`nRiot Vanguard will Exit and need to restart Computer.
  213. IfMsgBox,Yes
  214. {
  215. Process,close,vgtray.exe
  216. Sleep,100
  217. IfExist,C:\Riot Games
  218. FileRemoveDir,C:\Riot Games,1
  219. IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
  220. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
  221. IfExist,C:\Users\%A_UserName%\AppData\Local\VALORANT
  222. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\VALORANT,1
  223. IfExist,C:\ProgramData\Riot Games
  224. FileRemoveDir,C:\ProgramData\Riot Games,1
  225. IfExist,C:\Program Files\Riot Vanguard
  226. FileRemoveDir,C:\Program Files\Riot Vanguard,1
  227. MsgBox, 262208, Message, Deleting all Riot Folders...Success!!!
  228. }
  229. return
  230.  
  231. Delete_Data:
  232. Gui,VAL:+OWndialogs
  233. MsgBox, 36, Warning, Are you sure you want to Delete Riot Vanguard and Valorant Data?
  234. IfMsgBox,Yes
  235. gosub, Clean
  236. return
  237.  
  238. Create_Launcher:
  239. Gui,VAL:+OWndialogs
  240. IfExist,C:\Riot Games\Riot Client\RiotClientServices.exe
  241. FileCreateShortcut,C:\Riot Games\Riot Client\RiotClientServices.exe,VALORANT.lnk ,C:/Riot Games/Riot Client, --launch-product=valorant --launch-patchline=live
  242. else
  243. MsgBox, 16, Error, Cannot find RiotClientServices.exe
  244. return
  245.  
  246. Clean:
  247. Gui,VAL:+OWndialogs
  248. Run, *RunAs cmd.exe /c net stop vgk,,Hide
  249. Sleep 1000
  250. Run, *RunAs cmd.exe /c net stop vgc,,Hide
  251. Process,close,vgc.exe
  252. Process,close,vgtray.exe
  253. IfExist,C:\Program Files\Riot Vanguard
  254. FileRemoveDir,C:\Program Files\Riot Vanguard,1
  255. Run, *RunAs cmd.exe /c sc delete vgk,,Hide
  256. Run, *RunAs cmd.exe /c sc delete vgc,,Hide
  257.  
  258. RRG:=0
  259. Loop 3
  260. {
  261. Sleep,1000
  262. RegDelete,HKCR,riotclient
  263. RegDelete,HKLM,SYSTEM\CurrentControlSet\services\vgc
  264. RegDelete,HKLM,SYSTEM\CurrentControlSet\services\vgk
  265. RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Tracing\RiotClientServices_RASAPI32
  266. RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Tracing\RiotClientServices_RASMANCS
  267. RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run,Riot Vanguard
  268. RegDelete,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Run,Riot Vanguard
  269. RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
  270. RegDelete,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
  271. RegDelete,HKLM,SYSTEM\ControlSet001\Control\Session Manager,PendingFileRenameOperations
  272. RegDelete,HKLM,SYSTEM\ControlSet002\services\vgc
  273. RegDelete,HKLM,SYSTEM\ControlSet002\services\vgk
  274. RegDelete,HKLM,SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations
  275. RegDelete,HKLM,SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\VALORANT-Win64-Shipping.exe
  276. RegDelete,HKLM,SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\RiotClientServices.exe
  277.  
  278. RRG++
  279. if (RRG=1)
  280. SetRegView, 32
  281. else if(RRG=2)
  282. SetRegView, 64
  283. else
  284. {
  285. SetRegView, Default
  286. RRG:=0
  287. }
  288.  
  289. gosub, HKEY
  290.  
  291. IfExist,C:\Riot Games
  292. FileRemoveDir,C:\Riot Games,1
  293. IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
  294. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
  295. IfExist,C:\Users\%A_UserName%\AppData\Local\VALORANT
  296. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\VALORANT,1
  297. IfExist,C:\ProgramData\Riot Games
  298. FileRemoveDir,C:\ProgramData\Riot Games,1
  299. IfExist,C:\Program Files\Riot Vanguard
  300. FileRemoveDir,C:\Program Files\Riot Vanguard,1
  301. }
  302. MsgBox, 262208, Message, Deleting all Riot data...Success!!!
  303. return
  304.  
  305. Esc::
  306. VALGuiClose:
  307. Exit1:
  308. FileRemoveDir,%A_Temp%\reg,1
  309. ExitApp
  310.  
  311. HKEY:
  312. Loop,HKLM,SYSTEM\CurrentControlSet\Control\hivelist,K
  313. {
  314. if A_LoopRegName contains \Registry\User\S-1-5-21
  315. {
  316. if A_LoopRegName contains _Classes
  317. continue
  318. else
  319. R:= StrSplit(A_LoopRegName, "\")
  320. }
  321. }
  322. Prof:=R.4
  323. RegDelete,HKU,%Prof%\Software\Microsoft\Windows\CurrentVersion\Uninstall\Riot Game valorant.live
  324. return
  325.  
Add Comment
Please, Sign In to add comment