Mission sqm link

It's possible to start ArmAII in the single-player editor clicking on a <island>.sqm attached to a bug report.

You need

  1. the script open_from_http.cmd
  2. to assign you web browser to open *.sqm with the script
  • set arma2=arma2.exe <options>
  • set profile=<choose your custom profile directory, if any>



@echo off

:: Use one of the two below. Customize profile to your -profile option
set profile=I:\arma2_profiles\Users\cit
set profile=%USERPROFILE%\ArmA 2

:: Options used to run ArmA2
set arma2=arma2.exe -window -nopause -nosplash

:: Valid island names: default to Utes
set ISLANDS=Chernarus;Utes

:: Single-player missions directory
set missions=%profile%\missions

:: Island = name of %1 filename without .sqm
set filename=%~n1

:: Filter valid name
set island=
for %%I in ("%ISLANDS:;=" "%") do (call :get_island %%I)

if NOT DEFINED island set island=Utes

:: CIT mission directory and target
set mission=%missions%\__CIT.%island%
MD "%mission%" 
set mission=%mission%\mission.sqm

:: Different installation keys for distributions
set KEYS=HKEY_LOCAL_MACHINE\SOFTWARE\Bohemia Interactive Studio\ArmA 2/MAIN;HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam/InstallPath;HKEY_LOCAL_MACHINE\SOFTWARE\Bohemia Interactive\ArmA 2/InstallPath

for %%K in ("%KEYS:;=" "%") do (call :get_arma %%K)

copy /Y %1 "%mission%" 
cd /D "%arma2dir%" 
start %arma2% "%mission%" 

GOTO :end

    IF DEFINED island GOTO :eof
    set _in=%1
    set _in=%_in:"=%
    call set _b=%%filename:%_in%=%%
    IF /I %_b% NEQ %filename% SET island=%_in%
    GOTO :eof

    IF DEFINED arma2dir GOTO :eof
    set _key=%1
    set _key=%_key:"=%
    set _val=%_key:*/=%
    call set _key=%%_key:%_val%=%%
    set _key=%_key:/=%
    rem The line below has a TAB and TWO spaces
    for /F "tokens=3* delims=      " %%A in ('reg query "%_key%" /v %_val%') do set arma2dir=%%A
    GOTO :eof


ArmA 2 intallation path

Can be found in these registry keys:
  • HKEY_LOCAL_MACHINE\SOFTWARE\Bohemia Interactive\ArmA 2\InstallPath
  • HKEY_LOCAL_MACHINE\SOFTWARE\Bohemia Interactive Studio\ArmA 2\MAIN