Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
- ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
- ;@Ahk2Exe-Set FileDescription, Portable Valorant © VANHEARTNET
- ;@Ahk2Exe-Set FileVersion, 1.4.0.0
- ;@Ahk2Exe-SetInternalName Portable Valorant
- ;@Ahk2Exe-SetName Valorant
- ;@Ahk2Exe-SetOrigFileName Portable Valorant
- ;@Ahk2Exe-Set ProductName, Portable Valorant-NoBoot
- ;@Ahk2Exe-Set ProductVersion, 1.4.0.0
- ;@Ahk2Exe-Set Description, Portable Valorant
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
- ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
- ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
- ;@Ahk2Exe-SetMainIcon icon.ico
- ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
- ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
- ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
- ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
- #SingleInstance,Ignore
- #Persistent
- #NoEnv
- Menu,tray, NoStandard
- Menu, Tray, Tip, PORTABLE VALORANT
- Menu, Tray, Add, Exit1
- SetWorkingDir, %A_ScriptDir%
- SetBatchLines, 20ms
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- DetectHiddenWindows, On
- SetTitleMatchMode, 3
- SendMode Input
- if not A_IsAdmin
- {
- Run, *RunAs "%A_ScriptFullpath%"
- ExitApp
- }
- StringReplace,VGPath,A_ScriptFullPath,\%A_ScriptName%,,All
- IfNotExist,%A_Temp%\reg
- FileCreateDir,%A_Temp%\reg
- FileInstall,valwallpaper.jpg,%A_Temp%\reg\valwallpaper.png,1
- FileInstall,vgc1.reg,%A_Temp%\reg\vgc1.reg
- FileInstall,vgk1.reg,%A_Temp%\reg\vgk1.reg
- Gui,VAL:Color,333333
- Gui,VAL:Add,Picture,x0 y0 w500 h200,%A_Temp%\reg\valwallpaper.png
- Gui,VAL:Add,Groupbox,x240 y5 w250 h180,
- Gui,VAL:Add,Button,x260 y20 w100 h30 Center gDelete_Data,Delete Data
- Gui,VAL:Add,Button,x+20 y20 w100 h30 Center gDelete_Folders,Delete Folders
- Gui,VAL:Add,Button,x260 y+10 w220 h40 Center gLauncher,Launch Portable
- Gui,VAL:Add,Button,x260 y+20 w100 Center gMKLink,Create MKLink
- Gui,VAL:Add,Button,x260 y+5 w100 Center gCreate_Launcher,Create Shortcut
- Gui,VAL:Add,Button,x+20 y120 w100 Center gTut,TUTORIAL
- Gui,VAL:Add,Button,x380 y148 w100 Center gStartServices,Start Services
- Gui,VAL:Add,Button,x50 y70 w150 Center gSERV,Move VG
- Gui,VAL:Add,Button,x50 y+5 w150 Center gSTOP,Exit Vanguard
- Gui,VAL:Add,Button,x50 y+5 w150 Center gSTOP_VGK,STOP VGK
- Gui,VAL:Add,Button,x50 y+5 w150 Center gSTART_VGK,START VGK
- Gui,VAL:Font,Bold
- Gui,VAL:Add,Text,x48 y5 c888888 BackgroundTrans,Created by: VANHEARTNET
- Gui,VAL:Add,Text,x51 y5 c666666 BackgroundTrans,Created by: VANHEARTNET
- Gui,VAL:Add,Text,x50 y5 cLime BackgroundTrans,Created by: VANHEARTNET
- Gui,VAL:Show,% " w" 500 " h" 200,`t Valorant Tool-NoBoot
- return
- STOP_VGK:
- Gui,VAL:+OWndialogs
- MsgBox, 262180, Warning, Are you sure you want to Disable vgk.sys on your startup system?
- IfMsgBox, Yes
- {
- Run, *RunAs cmd.exe /c net stop vgc,,Hide
- Process,close,vgtray.exe
- Process,close,vgc.exe
- Run, *RunAs cmd.exe /c net stop vgk,,Hide
- Sleep, 100
- Run, *RunAs cmd.exe /c sc config vgk start= demand,,Hide
- MsgBox, 262208, Message, Success!`n`nYou need to reboot to apply changes.
- }
- return
- START_VGK:
- Gui,VAL:+OWndialogs
- Run, *RunAs cmd.exe /c net stop vgc,,Hide
- Process,close,vgtray.exe
- Process,close,vgc.exe
- Run, *RunAs cmd.exe /c net stop vgk,,Hide
- Sleep, 100
- Run, *RunAs cmd.exe /c sc config vgk start= system,,Hide
- MsgBox, 262208, Message, Success!`n`nYou need to reboot to apply changes.
- return
- STOP:
- Gui,VAL:+OWndialogs
- Run, *RunAs cmd.exe /c net stop vgc,,Hide
- Sleep 100
- Process,close,vgc.exe
- Process,close,vgtray.exe
- MsgBox, 262208, Message, Done!
- return
- SERV:
- Gui,VAL:+OWndialogs
- MsgBox, 36, Warning, Do you want to move Vanguard Installation path to This Directory?
- IfMsgBox,Yes
- {
- IfExist,C:\Program Files\Riot Vanguard
- FileRemoveDir,C:\Program Files\Riot Vanguard,1
- VGPath1=`"%VGPath%\Vanguard\Riot Vanguard\vgc.exe`"
- VGPath2=\??\%VGPath%\Vanguard\Riot Vanguard\vgk.sys
- VGPath3=`"%VGPath%\Vanguard\Riot Vanguard\vgtray.exe`"
- VGPath4=`"%VGPath%\Vanguard\Riot Vanguard\vgc.ico`"
- VGPath5=%VGPath%\Vanguard\Riot Vanguard
- VGPath6=`"%VGPath%\Vanguard\Riot Vanguard\uninstall.exe`"
- VGPath7=%VGPath%\Vanguard\Riot Vanguard\vgtray.exe
- VGPath8=Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
- RegRead,VG1,HKLM,SYSTEM\CurrentControlSet\services\vgc,ImagePath
- RegRead,VG2,HKLM,SYSTEM\CurrentControlSet\services\vgk,ImagePath
- RegRead,VG4,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,DisplayIcon
- RegRead,VG5,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,InstallLocation
- RegRead,VG6,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,UninstallString
- RegRead,VG7,HKCR,Local Settings\Software\Microsoft\Windows\Shell\MuiCache,%VPath7%
- RegRead,VG8,HKCU,Software\Microsoft\Windows\CurrentVersion\Applets\Regedit,LastKey
- if(VG1!=VGPath1)
- RegWrite,REG_EXPAND_SZ,HKLM,SYSTEM\CurrentControlSet\services\vgc,ImagePath,%VGPath1%
- if(VG2!=VGPath2)
- RegWrite,REG_EXPAND_SZ,HKLM,SYSTEM\CurrentControlSet\services\vgk,ImagePath,%VGPath2%
- if(VG4!=VGPath4)
- RegWrite,REG_EXPAND_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,DisplayIcon,%VGPath4%
- if(VG5!=VGPath5)
- RegWrite,REG_EXPAND_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,InstallLocation,%VGPath5%
- if(VG6!=VGPath6)
- RegWrite,REG_SZ,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard,UninstallString,%VGPath6%
- if(VG7!=VGPath7)
- RegWrite,REG_SZ,HKCR,Local Settings\Software\Microsoft\Windows\Shell\MuiCache,%VGPath7%
- if(VG8!=VGPath8)
- RegWrite,REG_SZ,HKCU,Software\Microsoft\Windows\CurrentVersion\Applets\Regedit,LastKey,%VGPath8%
- MsgBox, 262208, Message, Moving Complete!
- }
- return
- StartServices:
- Gui,VAL:+OWndialogs
- Process,close,vgc.exe
- IfExist,C:\Program Files\Riot Vanguard
- FileRemoveDir,C:\Program Files\Riot Vanguard,1
- Run *RunAs cmd.exe /c mklink /j "C:\Program Files\Riot Vanguard" "`%CD`%\Vanguard\Riot Vanguard",,Hide
- Run regedit.exe /s "%A_Temp%\reg\vgk1.reg"
- Run regedit.exe /s "%A_Temp%\reg\vgc1.reg"
- Sleep 20
- Run, *RunAs cmd.exe /c sc create vgk binpath= "C:\Program Files\Riot Vanguard\vgk.sys" type= Kernel start= system error= Ignore ,,Hide
- sleep 20
- Run, *RunAs cmd.exe /c sc create vgc binpath= "C:\Program Files\Riot Vanguard\vgc.exe" type= own start= demand error= Ignore ,,Hide
- sleep 1000
- sleep 10
- Run, *RunAs cmd.exe /c sc config vgk start= system,,Hide
- sleep 10
- Run, *RunAs cmd.exe /c sc config vgc start= demand,,Hide
- MsgBox, 262208, Message,Copy Dependencies Complete! `n`nPlease Restart your PC!
- return
- Tut:
- Run https://youtu.be/o1EtXFr7vkU
- Run https://youtu.be/pwUtVxvk5eo
- return
- MKLink:
- Gui,VAL:+OWndialogs
- IfExist,C:\Riot Games
- FileRemoveDir,C:\Riot Games,1
- IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
- FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
- IfExist,C:\ProgramData\Riot Games
- FileRemoveDir,C:\ProgramData\Riot Games,1
- IfExist,Portable Valorant\Riot Games
- MsgBox, 262208, Message, Success!!! Thank You!
- else
- {
- MsgBox, 262160, Error, Some files are missing or moved. Riot Games Folder.
- return
- }
- 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
- return
- Launcher:
- Gui,VAL:+OWndialogs
- IfExist,Portable Valorant.exe
- Run *RunAs cmd.exe /c "Portable Valorant.exe",,Hide
- else
- MsgBox, 16, Error, Portable Valorant.exe is Missing!
- return
- Delete_Folders:
- Gui,VAL:+OWndialogs
- 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.
- IfMsgBox,Yes
- {
- Process,close,vgtray.exe
- Sleep,100
- IfExist,C:\Riot Games
- FileRemoveDir,C:\Riot Games,1
- IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
- FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
- IfExist,C:\Users\%A_UserName%\AppData\Local\VALORANT
- FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\VALORANT,1
- IfExist,C:\ProgramData\Riot Games
- FileRemoveDir,C:\ProgramData\Riot Games,1
- IfExist,C:\Program Files\Riot Vanguard
- FileRemoveDir,C:\Program Files\Riot Vanguard,1
- MsgBox, 262208, Message, Deleting all Riot Folders...Success!!!
- }
- return
- Delete_Data:
- Gui,VAL:+OWndialogs
- MsgBox, 36, Warning, Are you sure you want to Delete Riot Vanguard and Valorant Data?
- IfMsgBox,Yes
- gosub, Clean
- return
- Create_Launcher:
- Gui,VAL:+OWndialogs
- IfExist,C:\Riot Games\Riot Client\RiotClientServices.exe
- FileCreateShortcut,C:\Riot Games\Riot Client\RiotClientServices.exe,VALORANT.lnk ,C:/Riot Games/Riot Client, --launch-product=valorant --launch-patchline=live
- else
- MsgBox, 16, Error, Cannot find RiotClientServices.exe
- return
- Clean:
- Gui,VAL:+OWndialogs
- Run, *RunAs cmd.exe /c net stop vgk,,Hide
- Sleep 1000
- Run, *RunAs cmd.exe /c net stop vgc,,Hide
- Process,close,vgc.exe
- Process,close,vgtray.exe
- IfExist,C:\Program Files\Riot Vanguard
- FileRemoveDir,C:\Program Files\Riot Vanguard,1
- Run, *RunAs cmd.exe /c sc delete vgk,,Hide
- Run, *RunAs cmd.exe /c sc delete vgc,,Hide
- RRG:=0
- Loop 3
- {
- Sleep,1000
- RegDelete,HKCR,riotclient
- RegDelete,HKLM,SYSTEM\CurrentControlSet\services\vgc
- RegDelete,HKLM,SYSTEM\CurrentControlSet\services\vgk
- RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Tracing\RiotClientServices_RASAPI32
- RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Tracing\RiotClientServices_RASMANCS
- RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run,Riot Vanguard
- RegDelete,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Run,Riot Vanguard
- RegDelete,HKLM,SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
- RegDelete,HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Riot Vanguard
- RegDelete,HKLM,SYSTEM\ControlSet001\Control\Session Manager,PendingFileRenameOperations
- RegDelete,HKLM,SYSTEM\ControlSet002\services\vgc
- RegDelete,HKLM,SYSTEM\ControlSet002\services\vgk
- RegDelete,HKLM,SYSTEM\CurrentControlSet\Control\Session Manager,PendingFileRenameOperations
- RegDelete,HKLM,SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\VALORANT-Win64-Shipping.exe
- RegDelete,HKLM,SOFTWARE\Microsoft\RADAR\HeapLeakDetection\DiagnosedApplications\RiotClientServices.exe
- RRG++
- if (RRG=1)
- SetRegView, 32
- else if(RRG=2)
- SetRegView, 64
- else
- {
- SetRegView, Default
- RRG:=0
- }
- gosub, HKEY
- IfExist,C:\Riot Games
- FileRemoveDir,C:\Riot Games,1
- IfExist,C:\Users\%A_UserName%\AppData\Local\Riot Games
- FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Riot Games,1
- IfExist,C:\Users\%A_UserName%\AppData\Local\VALORANT
- FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\VALORANT,1
- IfExist,C:\ProgramData\Riot Games
- FileRemoveDir,C:\ProgramData\Riot Games,1
- IfExist,C:\Program Files\Riot Vanguard
- FileRemoveDir,C:\Program Files\Riot Vanguard,1
- }
- MsgBox, 262208, Message, Deleting all Riot data...Success!!!
- return
- Esc::
- VALGuiClose:
- Exit1:
- FileRemoveDir,%A_Temp%\reg,1
- ExitApp
- HKEY:
- Loop,HKLM,SYSTEM\CurrentControlSet\Control\hivelist,K
- {
- if A_LoopRegName contains \Registry\User\S-1-5-21
- {
- if A_LoopRegName contains _Classes
- continue
- else
- R:= StrSplit(A_LoopRegName, "\")
- }
- }
- Prof:=R.4
- RegDelete,HKU,%Prof%\Software\Microsoft\Windows\CurrentVersion\Uninstall\Riot Game valorant.live
- return
Add Comment
Please, Sign In to add comment