Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: copy and paste the below line into the post-build event
- :: if you place cp-gta.bat somewhere other than your Projects directory, change "$(SolutionDir)..\cp-gta.bat" accordingly
- call "$(SolutionDir)..\cp-gta.bat" "$(TargetPath)" "$(TargetFileName)"
- :: copy and paste the text below into a file named cp-gta.bat, and put the file into your Projects directory ("Documents\Visual Studio 2015\Projects\" or wherever you store yours)
- @echo OFF
- set argFilePath=%1
- set argFileName=%2
- setlocal ENABLEEXTENSIONS
- set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Rockstar Games\Grand Theft Auto V"
- set VALUE_NAME=InstallFolder
- FOR /F "tokens=1-3" %%A IN ('REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul') DO (
- set ValueName=%%A
- set ValueType=%%B
- set ValueValue=%%C
- )
- if defined ValueName (
- copy /Y %argFilePath% "%ValueValue%\scripts\%argFileName%"
- ) else (
- echo GTA V InstallLocation registry key not found.
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement