Jump to content
  • 0

Bat File to join favorite servers no longer working with steam


DangerRuss

Question

I used to use batch files to join all of my favorite servers because dayz launcher so often gets screwy on me. The latest and greatest is it seems to believe my epoch installation is corrupt but it won't actually fix it. Launching the game through steam works fine but it's a process to have to remember the IP/Port to remote connect to all of my servers.

I used to use this

SETLOCAL ENABLEEXTENSIONS

:v64_path_a2
For /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2" /v "MAIN"') Do (set _ARMA2PATH=%%B)

IF NOT DEFINED _ARMA2PATH (GOTO v32_path_a2) ELSE (GOTO v64_path_a2oa)

:v32_path_a2
For /F "Tokens=2* skip=2" %%C In ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive Studio\ArmA 2" /v "MAIN"') Do (set _ARMA2PATH=%%D)

IF NOT DEFINED _ARMA2PATH (GOTO uac_PATH_A2) ELSE (GOTO v64_path_a2oa)

:uac_PATH_A2
FOR /F "tokens=2* delims=	 " %%I IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2" /v "MAIN"') DO (SET _ARMA2PATH=%%J)

IF NOT DEFINED _ARMA2PATH (GOTO std_PATH_A2) ELSE (GOTO v64_path_a2oa)

:std_PATH_A2
FOR /F "tokens=2* delims=	 " %%K IN ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive Studio\ArmA 2" /v "MAIN"') DO (SET _ARMA2PATH=%%L)

IF NOT DEFINED _ARMA2PATH (GOTO ENDfailA2) ELSE (GOTO v64_path_a2oa)

:v64_path_a2oa
For /F "Tokens=2* skip=2" %%E In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA" /v "MAIN"') Do (set _ARMA2OAPATH=%%F)

IF NOT DEFINED _ARMA2OAPATH (GOTO v32_path_a2oa) ELSE (GOTO RUN)

:v32_path_a2oa
For /F "Tokens=2* skip=2" %%G In ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA" /v "MAIN"') Do set (_ARMA2OAPATH=%%H)

IF NOT DEFINED _ARMA2OAPATH (GOTO uac_PATH_A2OA) ELSE (GOTO RUN)

:uac_PATH_A2OA
FOR /F "tokens=2* delims=	 " %%M IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA" /v "MAIN"') DO (SET _ARMA2OAPATH=%%N)

IF NOT DEFINED _ARMA2OAPATH (GOTO std_PATH_A2OA) ELSE (GOTO RUN)

:std_PATH_A2OA
FOR /F "tokens=2* delims=	 " %%O IN ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive Studio\ArmA 2 OA" /v "MAIN"') DO (SET _ARMA2OAPATH=%%P)

IF NOT DEFINED _ARMA2OAPATH (GOTO ENDfailA2OA) ELSE (GOTO RUN)

:run
:v64_path_steam
For /F "Tokens=2* skip=2" %%Q In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Valve\Steam" /v "InstallPath"') Do (set _STEAMPATH=%%R)

IF NOT DEFINED _STEAMPATH (GOTO v32_path_steam) ELSE (GOTO runs)

:v32_path_steam
For /F "Tokens=2* skip=2" %%S In ('REG QUERY "HKLM\SOFTWARE\Valve\Steam" /v "InstallPath"') Do (set _STEAMPATH=%%T)

IF NOT DEFINED _STEAMPATH (GOTO uac_path_steam) ELSE (GOTO runs)

:uac_path_steam
FOR /F "tokens=2* delims=	 " %%U IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Valve\Steam" /v "InstallPath"') DO (SET _STEAMPATH=%%V)

IF NOT DEFINED _STEAMPATH (GOTO std_path_steam) ELSE (GOTO runs)

:std_path_steam
FOR /F "tokens=2* delims=	 " %%W IN ('REG QUERY "HKLM\SOFTWARE\Valve\Steam" /v "InstallPath"') DO (SET _STEAMPATH=%%X)

IF NOT DEFINED _STEAMPATH (GOTO ENDfailSteam) ELSE (GOTO runs)

:runs

"%_ARMA2OAPATH%\ArmA2OA_BE.exe" 0 0 -nosplash -skipintro -noPause -world=empty "-mod=%_ARMA2PATH%;EXPANSION;ca;@DayzOverwatch;@DayZ_Epoch1051" -connect=YOURIP -port=YOURPORT /high

ENDLOCAL

:end
exit /B 0

:ENDfailA2
exit /B 1

:ENDfailA2OA
exit /B 2

:ENDfailSteam
exit /B 3

You would obviously change the IP and port for the server you want to join. However this no longer seems to work because it's missing some kind of steam launch parameter, and trying to join the server fails. Any ideas how to fix this?

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

No unfortunately it doesn't, I still get "session lost"

I did a little digging and I found this

steam://run/33930//-connect=IP%20-port=PORT%20-mod=@DayzOverwatch;%20-nosplash%20-world=empty%20-nopause

it doesn't seem to work though. Launches the game with Epoch even though Im trying to launch just Overwatch, and it hangs on wait for host.. but this is definitely closer to the mark. If we could just get the launch parameters that dayz launcher uses that would work.

Link to comment
Share on other sites

  • 0

I suspect since the addition of the Launcher that these aren't working any more: https://support.steampowered.com/kb_article.php?ref=1040-JWMT-2947 Trying your steam command (with a space after the steam call and spaces replacing the %20s) it opens the launcher but none of the parameters are used.

So long as steam is running you can use a .bat and call arma3.exe:

START /HIGH arma3.exe -Mod="@EpochExperimental;@Zombies and Demons;" -showScriptErrors -noPause -noSplash -noLauncher -connect=<server ip> -port=2302

That works for me and calling additional mod(s), the .bat file is in the root of the Arma folder. If Steam isn't running I end up with an arma3.exe running but no GUI, you have to end it in the Task Manager.

Link to comment
Share on other sites

  • 0

Your line doesn't even launch arma 2 for me. The bat file launches and nothing happens.

My line seems to launch arma through steam but it doesn't seem to apply the launch parameters for the server, it sits at "waiting for host." You can then back out to main menu and remote connect to the server. It also doesn't appear to change the mod no matter what mod parameters Im  using.

Link to comment
Share on other sites

  • 0

For some reason DayZ Launcher decided that the @Dayz_Epoch1051 folder is no longer the right name, even though it had been for a while. You can rename this folder to @Dayz_Epoch to fix this issue.

Here's the batch file I use to launch my testing server client:

 

@echo off
start "arma2" "arma2oa_BE.exe" -connect=192.168.1.7 -port=2302 "-mod=D:\Games\Steam\SteamApps\Common\ArmA 2;Expansion;D:\Games\Steam\steamapps\common\Arma 2 Operation Arrowhead\@DayZ_Epoch" -nosplash

Obviously change the ip/port/directories to suit your installation.

Link to comment
Share on other sites

  • 0

sweet I'll test this out. I was wondering why all of the sudden dayz launcher couldn't find my epoch mod. And the strangest thing when I Would try and verify the mod it would blue screen of death my pc.. really bizarre stuff.

 

Anyways my server isn't actually epoch or overpoch but this should help anyway

EDIT- Not working.. 
 

[Window Title]
ArmA2OA_BE.exe

[Content]
Windows cannot find 'ArmA2OA_BE.exe'. Make sure you typed the name correctly, and then try again.

[OK]

paths are correct.. so Im not sure..

Link to comment
Share on other sites

  • 0
On 6/3/2016 at 7:24 PM, salival said:

My batch file I posted works perfectly, it's also in the Arma 2 OA directory so I launch it from there. Post a copy of my version that you are using

I tried it exactly as you posted it with only changing the IP's. It launches me to the server and then boots me instantly.

 

Quote

have you reverted your arma 2 to legacy in steam?

I have not. I guess I should try that?

Link to comment
Share on other sites

  • 0
9 hours ago, DangerRuss said:

I tried it exactly as you posted it with only changing the IP's. It launches me to the server and then boots me instantly.

 

I have not. I guess I should try that?

Did you modify the paths to the mods?

Link to comment
Share on other sites

  • 0
On 6/5/2016 at 6:18 PM, salival said:

Did you modify the paths to the mods?

The file paths, IP, and port are all correct. This is not the issue.  

Ive tried this multiple different ways. I believe his way produces this error "Windows cannot find 'ArmA2OA_BE.exe'. Make sure you typed the name correctly, and then try again." Even though the file pathing and file names are correct.

My way is the closest one to working out of any of the suggested files, it just isn't actually changing the mod and if I manually change the mod and then boot I connect to to server before it kicks me with a service lost message.  I suppose it might be as the other gentlemen suggested and has something to do with my arma version. Still there is some way to do it if dayz launcher is doing it. I just need whatever launch parameters it is using.

Link to comment
Share on other sites

  • 0
On 6/6/2016 at 11:17 PM, DangerRuss said:

The file paths, IP, and port are all correct. This is not the issue.  

Ive tried this multiple different ways. I believe his way produces this error "Windows cannot find 'ArmA2OA_BE.exe'. Make sure you typed the name correctly, and then try again." Even though the file pathing and file names are correct.

My way is the closest one to working out of any of the suggested files, it just isn't actually changing the mod and if I manually change the mod and then boot I connect to to server before it kicks me with a service lost message.  I suppose it might be as the other gentlemen suggested and has something to do with my arma version. Still there is some way to do it if dayz launcher is doing it. I just need whatever launch parameters it is using.

Just curious if you managed to figure out launching the client with the batch file. 

Reverting it to legacy brought it back to before they did the update. It has always worked for me.  But it seems i might need to go back to the most recent arma 2 OA if i want to run a 106 server

Link to comment
Share on other sites

  • 0
9 minutes ago, theduke said:

Just curious if you managed to figure out launching the client with the batch file. 

Reverting it to legacy brought it back to before they did the update. It has always worked for me.  But it seems i might need to go back to the most recent arma 2 OA if i want to run a 106 server

This is my batch file for 1.0.6, it works perfectly with no issues.

@echo off
start arma2oa_be.exe 0 0 -connect=123.456.789.012 -port=2302 "-mod=D:\Games\Steam\SteamApps\Common\ArmA 2;EXPANSION;ca" "-mod=@DayzOverwatch;@DayZ_Epoch106" -showScriptErrors -nosplash -nopause

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...