SAH Support

Create IMS2 Configuration File

IMS2 Configuration Update

Please follow the steps below to update the IMS2 Oracle and SFTP connection settings.

Important: Please close IMS2 before starting the update.

Step 1 – Create the Update File

  1. Close IMS2 if it is currently running.
  2. Open Notepad.
  3. Copy all of the batch file text shown below in navy and paste it into Notepad.

Batch File Text

@echo off
setlocal
title IMS2 Configuration Update

set "INI=C:\ProgramData\Barcode Logic\IMS2\ims2.ini"
set "BACKUP=C:\ProgramData\Barcode Logic\IMS2\ims2.ini.backup"
set "WORK=%TEMP%\IMS2_ini_update_%RANDOM%_%RANDOM%.tmp"

rem ============================================================
rem Correct IMS2 configuration
rem ============================================================

set "NEW_CONNECTION=00440072006900760065007200490044003D004F00720061000D000A00440061007400610062006100730065003D0028004400450053004300520049005000540049004F004E0020003D002000280041004400440052004500530053005F004C0049005300540020003D0020002800410044004400520045005300530020003D0020002800500052004F0054004F0043004F004C0020003D0020005400430050002900280048004F005300540020003D00200068006C0074003700390037006500720070003000300031002E006800610064002E00730061002E0067006F0076002E00610075002900280050004F005200540020003D0020003100350032003100290029002900280043004F004E004E004500430054005F00440041005400410020003D002000280053004500520056004500520020003D0020004400450044004900430041005400450044002900280053004500520056004900430045005F004E0041004D00450020003D00200050005200440031002900290029000D000A0055007300650072005F004E0061006D0065003D0049004D00530052004F000D000A00500061007300730077006F00720064003D0074003000420033006F0072004E0030007400620033000D000A"
set "NEW_SFTP_HOST=0068006C0074006F00630073006900300031002E006800610064002E00730061002E0067006F0076002E00610075"
set "NEW_SFTP_USER=006F006300730069006600350034006600740070"
set "NEW_SFTP_KEY=0069006D0073005F00700072006500700072006F0064005F007200730061002E00700070006B"
set "NEW_SFTP_DEST=002E002E002F002E002E002F002E002E002F004400450056002F0064006100740061002F0065006E00730065006D0062006C0065002F006400610074006100620061007300650073002F006F00630073002F0069006E00740065007200660061006300650073002F00490046002D00350034002F0049006E0063006F006D0069006E0067002F"
set "NEW_RETRY=60"
set "NEW_TIMEOUT=30"

echo.
echo Updating IMS2 configuration...
echo.

rem Make sure the current IMS2 configuration exists.
if not exist "%INI%" goto FILE_NOT_FOUND

rem Back up the current INI before changing anything.
copy /Y "%INI%" "%BACKUP%" >nul
if errorlevel 1 goto BACKUP_FAILED

rem Create a new copy containing all existing settings except
rem the seven connection settings that are being replaced.
findstr /V /B /L /C:"ConnectionString=" /C:"SFTPHostName=" /C:"SFTPUserName=" /C:"SFTPKeyFileName=" /C:"SFTPDestDir=" /C:"SFTPRetrySecs=" /C:"HADTimeoutSecs=" "%INI%" > "%WORK%"
if errorlevel 1 goto BUILD_FAILED

rem Add the new connection settings.
>>"%WORK%" echo ConnectionString=%NEW_CONNECTION%
>>"%WORK%" echo SFTPHostName=%NEW_SFTP_HOST%
>>"%WORK%" echo SFTPUserName=%NEW_SFTP_USER%
>>"%WORK%" echo SFTPKeyFileName=%NEW_SFTP_KEY%
>>"%WORK%" echo SFTPDestDir=%NEW_SFTP_DEST%
>>"%WORK%" echo SFTPRetrySecs=%NEW_RETRY%
>>"%WORK%" echo HADTimeoutSecs=%NEW_TIMEOUT%

rem Copy the completed file into place.
copy /Y "%WORK%" "%INI%" >nul
if errorlevel 1 goto WRITE_FAILED

rem Verify that the live INI is exactly the same as the completed file.
fc /B "%WORK%" "%INI%" >nul
if errorlevel 1 goto VERIFY_FAILED

del /Q "%WORK%" >nul 2>&1

echo.
echo ============================================
echo       CONFIGURATION UPDATE COMPLETE
echo ============================================
echo.
echo IMS2 has been successfully updated.
echo.
echo A backup of the previous configuration is:
echo %BACKUP%
echo.
pause
exit /b 0

:FILE_NOT_FOUND
echo ERROR: IMS2 configuration file was not found.
echo Expected file:
echo %INI%
goto FAILED_NO_RESTORE

:BACKUP_FAILED
echo ERROR: Could not create a backup of ims2.ini.
goto FAILED_NO_RESTORE

:BUILD_FAILED
echo ERROR: Could not create the updated configuration file.
goto RESTORE

:WRITE_FAILED
echo ERROR: Could not write the updated IMS2 configuration.
goto RESTORE

:VERIFY_FAILED
echo ERROR: The updated IMS2 configuration could not be verified.
goto RESTORE

:RESTORE
if exist "%BACKUP%" copy /Y "%BACKUP%" "%INI%" >nul
del /Q "%WORK%" >nul 2>&1
echo.
echo The original IMS2 configuration has been restored.
goto FAILED

:FAILED_NO_RESTORE
del /Q "%WORK%" >nul 2>&1

:FAILED
echo.
echo ============================================
echo       CONFIGURATION UPDATE FAILED
echo ============================================
echo.
echo IMS2 has NOT been successfully updated.
echo Please contact Barcode Logic for assistance.
echo.
pause
exit /b 1
DOWNLOAD OPTION

Steps for download link

Please close IMS2 before starting.

  1. Click the Download IMS2 Configuration Update link.
  2. When prompted to save the file, save it to:
    C:\ProgramData\Barcode Logic\IMS2
  3. The downloaded file should be named:
    IMS2ConfigBatch.bat
  4. Open File Explorer and go to:
    C:\ProgramData\Barcode Logic\IMS2
  5. Double-click IMS2ConfigBatch.bat.
  6. A black command window will open and update the IMS2 configuration.
  7. When the update has completed successfully, the following message will be displayed:
    CONFIGURATION UPDATE COMPLETE IMS2 has been successfully updated.
  8. Press any key to close the window.
  9. Open IMS2 normally.

If the update fails

If CONFIGURATION UPDATE FAILED is displayed, do not make any further changes. Please contact Barcode Logic for assistance.

The update automatically creates a backup of the existing IMS2 configuration before making any changes.

Step 2 – Save the File

  1. In Notepad, click File > Save As.
  2. In the File name box enter:

    C:\ProgramData\Barcode Logic\IMS2\IMS2ConfigBatch.bat
  3. Change Save as type to:

    All Files (*.*)
  4. Click Save.

Step 3 – Run the Update

  1. Open File Explorer.
  2. Click in the address bar at the top of File Explorer and enter:

    C:\ProgramData\Barcode Logic\IMS2
  3. Press Enter.
  4. Locate:

    IMS2ConfigBatch.bat
  5. Double-click IMS2ConfigBatch.bat.
  6. Wait for the update to complete.
    When the update has completed successfully, the window will display:

    IMS2 configuration updated successfully
  7. Press any key to close the update window.
  8. Start IMS2 normally.


What the Update Changes

The update changes only the required IMS2 Oracle connection, SFTP connection and timeout settings.

Existing printer settings, label settings and other IMS2 configuration options are not changed.

A backup of the existing ims2.ini file is automatically created before any changes are made.

Buying Guide

Please complete the form below and our expert staff will assist you with choosing the right product for you.

bcl icon pop