FtpUpdate

FtpUpdate.exe is a program, that is placed on a client computer. After it is start, the program synchronizes files, that are placed on the client computer with files located on FTP server (1st parameter of FtpUpdate.exe) in so-called sample directory. When the synchronisation is complete, FtpUpdate runs the program given by next parameters. FtpUpdate is located in the directory D2000.SDK\FtpUpdate on D2000 installation DVD.

Installation

After installation of a D2000 system client, it is necessary to copy the file FtpUpdate.exe to the subdirectory Bin of the installation directory of the local computer.
After start, this file executes synchronisation of the installation and application directory contents with the installation and application directory contents in FTP source.


FTP server configuration:

  1. Name of FTP server is a parameter and it is entered as the first parameter (required) of the program FtpUpdate.exe. Configuration for creation of a connection is used from the system setting (INTERNET_OPEN_TYPE_PRECONFIG).
  2. Name of FTP user: anonymous with the access right READ into the required directories.
  3. FTP server directory structure:
    The directory D2000 must be created in the FTP root directory. Other directories within the frame of the directory D2000 are located there. The directories contain the sample directories with client installations according to the client type. The name of installation type is equal with the subdirectory name.

    Value in system registry Installation type
    1 OPERATOR
    2 OPERATOR_LITE
    3 MANAGER
    4 ODBC
    5 WEB1
    6 OPERATOR_BASIC
    7 OPERATOR_BASIC_WBK
    8 OPERATOR_STANDARD
    9 OPERATOR_DESIGNER
    10 OFFICE
    11 WEB2
  4. Installation type is written in the system registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Ipesoft\D2000V55\Console

    Example:
    The console OPERATOR_STANDARD (value HKEY_LOCAL_MACHINE\SOFTWARE\Ipesoft\D2000V55\Console=8). After the start, the program ftpupdate.exe synchronizes the local directories Bin, ResDll, Msg, Help with the directories D2000\OPERATOR_STANDARD\Bin, D2000\OPERATOR_STANDARD\ResDll, D2000\OPERATOR_STANDARD\Msg, D2000\OPERATOR_STANDARD\Help. For other installation type is selected other particular directory.

    Current version of files, which will be copied on client computers, must be placed into the mentioned directories.

  5. In case that automatic update of the program FtpUpdate.exe on client computers is needed, it is necessary to place a newer version of ftpupdate.exe into the FTP root directory of the FTP server (same level as the directory D2000).

Program operation


Parameters:

FtpUpdate.exe FTPSrvName [/PASSIVE] [/NOBEFORE] [/NOAFTER] [/BPparam1] [/BPparam2] [/APparam1] [FILE_TO_RUN.EXE [param1] [param2] [paramN]]*

Parameter Meaning
FTPSrvName Name of ftp server.
/PASSIVE Uses passive FTP mode.
/NOBEFORE Disables starting of before.bat and before.vbs scripts.
/NOAFTERDisables starting of after.bat and after.vbs scripts.
/BPparam Gives the parameter param to the before.bat and before.vbs scripts. There may be defined several /BP parameters.
/APparam Gives the parameter param to the after.bat and after.vbs scripts. There may be defined several /AP parameters.
FILE_TO_RUN.EXE Name of a file to be run automatically after termination of FTPUpdate.
param1..paramN Parameters to give to the FILE_TO_RUN.EXE file.

* parameters enclosed between square brackets [] are optional


Program run:

  1. After starting FtpUpdate.exe, the program is searching for a newer version of \\FTPSrvName\D2000\FtpUpdate.exe.
    • If yes: The program copies this version using the temporary name FtpTemp.exe into the directory Bin on local computer, transmits its own parameters, runs the version and terminates itself. FtpTemp.exe makes a copy of itself into the file FtpUpdate.exe and executes the synchronisation of directories (item 2).
    • If no: The program continues in the synchronisation of directories (item 2).
  2. Running the scripts before running the synchronisation:
    If the scripts before.bat or before.vbs are placed in the directory D2000 on the FTP server, they are to be copied to a local computer and executed. If FTPUpade.exe is running with the parameters /BPparameter1 /BPparameter2 /BPparameterN, they will be given to the script (without the prefix /BP). Scripts are deleted after their execution. To avoid running the scripts, run FTPUpadate.exe with the command line parameter /NOBEFORE.
  3. Synchronisation of directories:
    According to the console type, it evaluates the name of the sample directory on the FTP server. Then it synchronises the directories on the FTP server. For example:

    D2000\sample_directory\Bin Bin
    D2000\sample_directory\ResDll ResDll
    D2000\sample_directory\Msg Msg
    D2000\sample_directory\Help Help
    D2000\sample_directory\Inst_Odbc Inst_Odbc

  4. The synchronisation does not delete any files on local computer.

  5. Running the scripts after synchronisation.
    If the scripts before.bat or before.vbs are placed in the directory D2000 on the FTP server, they are to be copied to a local computer and executed. If FTPUpade.exe is running with the parameters /BPparameter1 /BPparameter2 /BPparameterN, they will be given to the script (without the prefix /BP). Scripts are deleted after their execution. To avoid running the scripts, run FTPUpadate.exe with the command line parameter /NOAFTER. They allow to e.g. register components and etc.
  6. After terminating the synchronisation, the program FTPUpdate will register the Add-in D2000 WorkBook for MS Excel.
  7. Then the program FTP update will run the program specified by given parameters.

Example:
FtpUpdate.exe D2SRV /NOBEFORE /APparam1 /APparam2 HI.EXE /SD2SRV /F60 /LSK /TP

The example above provides for:

  • ignoring the scripts before.bat and before.vbs,
  • version update,
  • running the scripts after.bat and after.vbs with the command line parameters param1 param2,
  • running D2000 HI with the command line parameters /SD2SRV /F60 /LSK /TP.

In this way, it is possible (transparently for user) to check, and if necessary to synchronise the version before every running the program (for example D2000 HI) the following change of the shortcut:

Shortcut with no change (no automatic update):

Shortcuts after a change:

The change is based on running ftpupdate.exe instead of hi.exe, with the process start parameters unchanged.

To provide the correct shortcut icon it is necessary to click the button Change Icon and to set:

Napíšte komentár