Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::TESTED ONLY ON WINDOWS 7 64 bit ENGLISH version (Using english word: "Console" when cleaning variables)
- ::EVERYTHING is done with trial and error!
- ::This bat file closes Guild Wars 2 "AN-Mutex-Window-Guild" handle so you can launch multiple clients. Scroll down for more info.
- ::------------------------------------------------------------------------------------------
- :: 1) Start first/main account. To disable/enable: add/remove :: at the start. Use your file location! Jump to part 4 for second client.
- ::start /b "" "[MAIN GW2 .exe location]"
- ::start /b "" "C:\Pelit\Guild Wars 2\Gw2.exe"
- :: 1.5)
- ::Waiting x milliseconds. To disable/enable: add/remove :: at the start.
- ping 1.1.1.1 -n 1 -w 1000 > nul
- :: 2)
- ::Get handle ID and process ID and save it was txt file
- handle -a -p gw2.exe | findstr /i /R AN-Mutex-Window-Guild > GW2HandleTMP.txt
- tasklist | findstr /i /R Gw2.exe > GW2PIDTMP.txt
- ::Set handle ID and process ID as parameters
- set /P VAR11=<GW2PIDTMP.txt
- set /p VAR1=<GW2HandleTMP.txt
- ::Cleaning strings
- SET _endbit1=%VAR1:*:=%
- CALL SET VAR2=%%VAR1:%_endbit1%=%%
- SET _endbit11=%VAR11:*Console=%
- CALL SET VAR21=%%VAR11:%_endbit11%=%%
- SET VAR3=%VAR2::= %
- SET VAR31=%VAR21:Console= %
- SET VAR41=%VAR31:Gw2.exe= %
- SET VAR4=%VAR3: =%
- SET VAR51=%VAR41: =%
- :: 3)
- ::Closing "AN-Mutex-Window-Guild" handle
- handle -c %VAR4% -y -p %VAR51%
- :: 4) Start second/alt account. To disable/enable: add/remove :: at the start.
- ::Use your second windows account and new Guild Wars 2 folder location.
- ::Asks windows user password only on first time. Keep writing your windows use
- ::C:\Windows\System32\runas.exe /savecred /user:[WINDOWS USER] "[2nd GW2 .exe location]"
- C:\Windows\System32\runas.exe /savecred /user:gw3 "D:\Pelit\Guild Wars 2\Gw2.exe"
- :: 5)
- del GW2HandleTMP.txt
- del GW2PIDTMP.txt
- ::------------------------------------------------------------------------------------------
- ::Preparations
- ::-Create second windows account, Change part 4 user^. (Need 2nd user for another local.dat file)
- ::-Create second copy of Guild Wars 2 folder, Change part 4 folder (-sharearchive doesn't work with this thing)
- ::You need Handle.exe from microsoft technet (https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx)
- ::Copy/paste handle.exe in C:\Windows\System32. You can test it by opening cmd and typing: handle, if error, google.
- ::What this should do is
- :: 1) Start main client. Use your file location path!
- :: 1.5) timer
- :: 2) Find IDs, cleans/trims strings and set ID as parameter. (Saves temp txt file because I don't know how to use CMD... Files can be removed after client launches(or are removed automatically...))
- :: 3) Close "AN-Mutex-Window-Guild" handle
- :: 4) Launch second client. Use your file location path AND windows user account!
- ::Handle.exe, https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx
- ::Close handle idea, http://www.guildwars2guru.com/topic/582-multiple-guild-wars-2-clients-running-on-1-computer/#entry21242
- ::Variable cleaning, http://ss64.com/nt/syntax-replace.html
- ::Wait x ms, http://stackoverflow.com/questions/1672338/how-to-sleep-for-5-seconds-in-windowss-command-prompt-or-dos
Advertisement
Add Comment
Please, Sign In to add comment