FileZilla Server3: UniTray

Uniform Server 5-Nano
FileZilla FTPd (Server).

UniTray FileZilla control

The potable FileZilla core is a very flexible design its external interface is via batch files this allows it to be extracted and used independently of Uniform server. However with a default installation it can be controlled from UniTray. Advantage of this all server control becomes accessible from a single location.

This page shows how to configure UniTray to control both Uniform and FileZilla servers. Although the plugin download includes an example of the finished UniTray1.ini file it is worth looking at the changes in detail. This will allow you to integrate other elements if you wish.

UniTray Configuration file

UniTray's configuration file is located as follows:

UniServer\unicon\tray_menu\UniTray1.ini

Path variables

UniTray needs to know where to find the batch files to run FileZilla server. There are two paths one specifically for portable mode and one for the core control:

X:\yyy\zzz\UniServer\filezilla_server\portable - Portable
X:\yyy\zzz\UniServer\filezilla_server\filezilla_ftpd - FileZilla core

To emphasise Uniform Server can be located on any drive and in any folder I have included the full path. The first part X:\yyy\zzz\UniServer is automatically calculated by UniTray and placed in variable %top%

The above paths can be rewritten as follows:

%top%\filezilla_server\portable - Portable
%top%\filezilla_server\filezilla_ftpd - FileZilla core

These paths are used several times and typing them becomes a chore hence they are assigned to two user variables as follows:

  • Fzp = %top%\filezilla_server\portable
  • Fz = %top%\filezilla_server\filezilla_ftpd

Top

Add variables to config file

They require writing in UniTrays format and located at the end of the [Variables] block as shown below:

Type: static; Name: ServerConMain; Value: "%top%\unicon\main"
Type: static; Name: Fzp; Value: "%top%\filezilla_server\portable"
Type: static; Name: Fz; Value: "%top%\filezilla_server\filezilla_ftpd"

Top

Left - Menu

The left menu runs programs in standard program mode. These are split into individual and combined control.

Top

Individual Control

A command line has the following format:

Type: item; Caption: "FileZilla Run Portable"; Action: run; FileName: "%Fzp%\fzp_start.bat"; ShowCmd: hidden; Glyph: 9

It looks a little intimidating however its composed of small elements as follows:

Type: item; - Signifyes this is a menu idem to be displayed
Caption: - Text that will be display for the menu item
Action: - When the menu item is clicked perform this function (run single command or multi run more than one comannd)
FileName: - Name of file to run
ShowCmd: - Default is visible if hidden hides the command window
Glyph: - Small image displayed to the left of a caption.

Batch files

There are four batch files these are shown below. The first fzp_start.bat rewrites path in FileZilla’s configuration file (portable mode) enabled by default. The second line does not rewrites path in FileZilla’s configuration file (static mode) commented out by default.

Depending how you want to run FileZilla switch between these two lines as appropriate. Uncomment one and comment the other one using “;”

  • fzp_start.bat - Start FileZilla sever (rewite configuration file)
  • zilla_start.bat - Start FileZilla sever (do not rewite configuration file)
  • zilla_stop.bat - Stop FileZilla server
  • zilla_admin.bat - Start FileZilla Amin (note thee is no stop hence you need to manually close Admin)

Translating the above into UniTrays;s format gives the last four lines shown below. Locate the [Individual_Service_Control] block and add these lines

Type: item; Caption: "Stop  MySQL  Server"; Action: shellexecute; FileName: "%PHP%\php-win.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 2"; Glyph: 11
  Type: separator
Type: item; Caption: "FileZilla Run Portable"; Action: run; FileName: "%Fzp%\fzp_start.bat"; ShowCmd: hidden;  Glyph: 9
; Type: item; Caption: "FileZilla Run Static";   Action: run; FileName: "%Fz%\zilla_start.bat"; ShowCmd: hidden;  Glyph: 9
Type: item; Caption: "FileZilla Stop";         Action: run; FileName: "%Fz%\zilla_stop.bat"; ShowCmd: hidden;  Glyph: 11
Type: item; Caption: "FileZilla Run Admin"; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden;  Glyph: 9

Top

Combined Control

The first two menu items require converting into a multi-action format.

The first line now has this format:

Type: item; Caption: "Start (Apache MySQL Zilla)"; Action: multi; Actions: StartApacheMySQLZilla; Glyph: 9

Again this is composed of small elements as follows:

Type: item; - Signifyes this is a menu idem to be displayed
Caption: - Text that will be display for the menu item
Action: - When the menu item is clicked perform this function (multi run more than one comannd)
Actions: - A list of actions to run these are contained in a separate named block
Glyph: - Small image displayed to the left of a caption.

The named block StartApacheMySQLZilla has the following format:

[StartApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\start_servers.php 7";ShowCmd: hidden
Action: run; FileName: "%Fzp%\fzp_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden

The second and third lines provide either portable (default) or static as previously explained. Depending how you want to run FileZilla switch between these two lines as appropriate. Uncomment one and comment the other one using “;”

The fourth line is optional and runs FilZilla Admin at start up uncomment, “Remove semi colon” to enable this. Top

Modification to config

Replace the first two menu items with:

Type: item; Caption: "Start (Apache MySQL Zilla)"; Action: multi; Actions: StartApacheMySQLZilla; Glyph: 9
Type: item; Caption: "Stop (Apache MySQL Zilla)"; Action: multi; Actions: StopApacheMySQLZilla; Glyph: 11

At the end of the configuration file add the following blocks:

[StartApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\start_servers.php 7";ShowCmd: hidden
Action: run; FileName: "%Fzp%\fzp_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden

[StopApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\stop_servers.php 7";ShowCmd: hidden
Action: run; FileName: "%Fz%\zilla_stop.bat"; ShowCmd: hidden

Top

Right-Menu

The right menu runs programs as a service. These are split into individual and combined control.

Top

Individual Control

A command line has the following format:

Type: item; Caption: "FileZilla Install/Run Service"; Action: run; FileName: "%Fz%\zilla_service_start.bat"; ShowCmd: hidden; Glyph: 0

It looks a little intimidating however its composed of small elements as follows:

Type: item; - Signifies this is a menu idem to be displayed
Caption: - Text that will be display for the menu item
Action: - When the menu item is clicked perform this function (run single command or multi run more than one comannd)
FileName: - Name of file to run
ShowCmd: - Default is visible if hidden hides the command window
Glyph: - Small image displayed to the left of a caption.

Batch files

There are three batch files these are shown below. Note there is not a portable option because service is not compatible with portability.

  • zilla_service_start.bat - Install and run FileZilla as a service
  • zilla_service_stop.bat - Stop and Uninstall FileZilla service
  • zilla_admin.bat - Start FileZilla Amin (note thee is no stop hence you need to manually close Admin)

Translating the above into UniTrays's format gives the last three lines shown below. Locate the [Individual_Service_Control] block and add these lines

Type: item; Caption: "Stop Uninstall MySQL Service"; Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php 2"; Glyph: 1
 Type: separator
Type: item; Caption: "FileZilla Install/Run Service";    Action: run; FileName: "%Fz%\zilla_service_start.bat"; ShowCmd: hidden;  Glyph: 0
Type: item; Caption: "FileZilla Stop/Uninstaal Service"; Action: run; FileName: "%Fz%\zilla_service_stop.bat"; ShowCmd: hidden;  Glyph: 1
Type: item; Caption: "FileZilla Run Admin"; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden;  Glyph: 9

Top

Combined Control

Again the first two menu items require converting into a multi-action format.

The first line now has this format:

Type: item; Caption: "Install and Run All Services"; Action: multi; Actions: ServiceStartApacheMySQLZilla ; Glyph: 0

Again this is composed of small elements as follows:

Type: item; - Signifies this is a menu idem to be displayed
Caption: - Text that will be display for the menu item
Action: - When the menu item is clicked perform this function (multi run more than one comannd)
Actions: - A list of actions to run these are contained in a separate named block
Glyph: - Small image displayed to the left of a caption.

The named block ServiceStartApacheMySQLZilla has the following format:

[ServiceStartApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_install_run.php 7";ShowCmd: hidden
Action: run; FileName: "%Fz%\zilla_service_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden

The third line is optional and runs FilZilla Admin at start up uncomment, “Remove semi colon” to enable this. Top

Modification to config

Replace the first two menu items with:

Type: item; Caption: "Install and Run All Services"; Action: multi; Actions: ServiceStartApacheMySQLZilla ; Glyph: 0
Type: item; Caption: "Stop and Remove All Services"; Action: multi; Actions: ServiceStopApacheMySQLZilla; Glyph: 1

At the end of the configuration file add the following blocks:

[ServiceStartApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_install_run.php 7";ShowCmd: hidden
Action: run; FileName: "%Fz%\zilla_service_start.bat"; ShowCmd: hidden
; Action: run; FileName: "%Fz%\zilla_admin.bat"; ShowCmd: hidden

[ServiceStopApacheMySQLZilla]
Action: shellexecute; FileName: "%PHP%\php.exe"; Parameters: " -n %ServerConMain%\service_stop_uninstall.php  7";ShowCmd: hidden
Action: run; FileName: "%Fz%\zilla_service_stop.bat"; ShowCmd: hidden

Top

Summary

For controlling both Uniform and FileZilla servers the above has shown how easy UniTray is to configure.

However if you find the above daunting use one of the pre-configured files found in folder

UniServer\filezilla_server\unitray_language

choose appropriate language and copy the file UniTray1.ini to folder

UniServer\unicon\tray_menu.


Top