[toc]


1. General


1.1. There is a special utility "Switcher.exe" that offers the user to choose application to start during timeout set and starts the default application set if no choise has been made during timeout. Actually, this utility can do anything you set in its bat file.

1.2. You are able to download this utility from ftp://ftpint.ucs.ru/dealers/rk7/INSTALL/OTHER/switcher/HotCashSwitch.zip.

1.3. The Switcher utility distributive archive contains 4 files: Switcher.bat, switcher.exe, switcher.ini, winCS.bat.

1.4. You have to put all the files from distributive to RK7 backup PC folder \WIN\ (or that folder where are files wincash.bat and midserv.exe).

1.5. This utility employs RK7 cash server backup function to make this cash server available in case of its main PC breakdown. So, if you set backup of some cash server to another PC, it becomes available on both, except license key.


2. Setup files


2.1. switcher.ini

2.1.1. File format

[Config]
Menu0=Cash Station (normal mode)
Menu1=With cash server (backup mode)
timeout=7
timemessage=%d seconds left to choose

2.1.2. Settings description

2.1.2.1. "Menu0" is the default application button text to show. "Menu1" is the secondary (with backup cash server) application button text to show.

2.1.2.2. "timeout" is the time in seconds to show Switcher before default application start.

2.1.2.3. "timemessage" is the Switcher timeout notification to show on screen.

2.2. Switcher.bat

2.2.1. File format

SET BackupPath=C:\backup
SET MidbasePath=C:\UCS\MIDBASE
SET SecINIPath=C:\UCS\CASH\SecINI
SET MainINIPath=C:\UCS\CASH\MainINI
SET RK7Path=C:\UCS\CASH
@echo off
switcher.exe
if errorlevel 1 goto l1
if errorlevel 2 goto l2
copy "%MainINIPath%\wincash.ini" "%RK7Path%"
Wincash.bat

goto end


:l1
FOR /F "delims=|" %%I IN ('DIR "%BackupPath%\Work*.UDB" /B /O:D') DO SET NewestFile=%%I
copy "%BackupPath%\%NewestFile%" "%MidbasePath%\work.udb"
copy "%SecINIPath%\wincash.ini" "%RK7Path%"
WinCS.bat

goto end

2.2.2. Settings description

2.2.2.1. "BackupPath" is the folder set in RK7 to put cash server work.udb backup to.

2.2.2.2. "MidbasePath" is the folder with backup cash server work.udb set in its rkeeper.ini.

2.2.2.3. "MainINIPath" is the special folder where you have to put wincash.ini for normal system startup mode ("Menu0" button case).

2.2.2.4. "SecINIPath" is the special folder where you have to put wincash.ini for backup system startup mode ("Menu1" button case).

2.2.2.5. "RK7Path" is the \WIN\ (default case) folder where wincash.bat and midserv.exe are working and where to copy wincash.ini to.

2.3. winCS.bat

2.3.1. File format

REM WinCash update and start
SET PRELOADPATH=.\PRELOAD
if /%1 == / goto defini
SET CASHINIPATH=%1
goto now_run
:defini
SET CASHINIPATH=.\wincash.ini
:now_run
start Midserv.exe /desktop
ping 127.0.0.1 -n 10
preload.exe %CASHINIPATH%
for %%c in (%PRELOADPATH%\*.dll) do del /F %%~nc.bak
for %%c in (%PRELOADPATH%\*.dll) do ren %%~nc.dll *.bak
xcopy %PRELOADPATH% .\ /S /C /R /Y
rmdir %PRELOADPATH% /S /Q
start doscash.exe %CASHINIPATH%

2.3.2. Settings description

2.3.2.1. This is modified wincash.bat file to start backup cash server with cash station in case of Menu1" button pressed.


3. Scheme usage


3.1. Backup RK7 cash server

3.1.1. You have to set backup for cash server to the folder on backup PC set in 2.2.2.1.

3.1.2. Cash server backup setting description are in 2.1 .

3.1.3. You should guess proper backup periodicity and number of copies because the script selects the newest work.udb backup to start cash server on reserve PC.

3.2. wincash.ini files

3.2.1. You have to set 2 different wincash.ini for normal cash station start on backup PC (connected to cash server on main PC, "Menu0" mode) and backup cash station startup mode (connected to backup cash server started on backup PC, "Menu1" mode).

3.2.2. Due to this is one cash server in both startup modes, you may use one wincash.ini without [TCPDNS] settings.

3.2.3. If you do not use cash station on backup PC normally, simplify these scheme on your own.

3.3. Operation

3.3.1. To use switcher you have to start Switcher.bat (instead of regular wincash.bat).

3.3.2. When started switcher, press one of "mode" buttons and proceed with RK7 cash station started (mind 3.3.3).

3.3.3. Transfer Guardant key to backup PC before start of corresponding mode with cash server.

3.3.4. When broken main cash server PC finally restored, copy cash server files from backup PC (and restore your specific settings if necessary).

3.3.5. Do not start cash server on main PC without copying work.udb used on reserve PC! Do not make some order operations on backup PC if you started backup mode by accident! Mind that cash server database must be synchronised in time and started only in one instance!



  • No labels