• mSupply Server can be installed on a range of Windows OS hardware platforms. Installations of the mSupply Server and client software on these different platforms will not be identical.
  • This page includes instructions for installing the mSupply Server and client software on a typical Windows 10 Pro platform. This will include many hardware configuration issues as these have been known to be important for mSupply Server operation and troubleshooting.

Recommend Hardware

The following table lists minimum recommended hardware for an mSupply server

Item Recommendation
OS Windows 2008 / 2011 / 2012 / 2016 or Win 7 / 8 / 10 Pro with latest service packs
Processor Dual core Xeon or equivalent. For greater than 15 users: Quad core Xeon
Memory ECC memory Minimum 4Gb +1Gb per user over 8 users
Hard disks 3 Hard drives to run RAID 1 (or 5) Array + Hot Spare. 1 separate Hard disk for primary back up
Network card Gigabit
RAID controller RAID 1: Onboard RAID controller is fine
Power supply Dual hot-swap power supply is best, single power supply acceptable with good power quality

Indicative pricing before local taxes: USD3,000 to USD5,000.

For a Terminal server, the general specification changes in that

  • More RAM is needed.
  • Hard disks are less important, as no data is stored on the server (unless you are using the same server for both hosting the mSupply server and hosting the terminal sessions).
  • An additional Gigabit Ethernet port could be useful

Pricing should be similar.

Beware of Solid State Drives (SSDs) without Power Loss Protection!

At least one country using mSupply on servers with SSDs installed has had the bitter experience of the SSDs failing after ungraceful shutdowns due to failing UPSes.

The vast majority of ICT documentation on the internet is written from and for locations enjoying relatively stable power supplies. When the above-mentioned experience happened, there was precious little information available for facilities suffering from the sort of chronic power supply issues which the majority of mSupply users experience. Now there is more literature - refer here : Surviving SSD sudden power loss

Even though you have the server protected by a UPS, the batteries will fail sooner or later, based on this, our strong recommendation is that unless you are sure that your SSDs will survive a power failure:

Avoid the use of SSDs in servers.

To achieve performance gains, invest instead in more RAM.

Installation pre-checks

UPS (Interruptible power supply)

  • Unless you have extremely reliable power we strongly suggest you install a UPS with external batteries that will provide several hours run time, e.g.:
  • The UPS must be able to communicate with the server (usually with a USB cable) to initiate a graceful shutdown in advance of UPS shutdown.
  • For the UPS to protect the server from power surges / spikes, the UPS needs to be connected to a power socket that is properly earthed.

More details on configuration of the UPS is contained below.

ICT capacity

Do you have sufficient in-house ICT capacity to do the rest of the server installation yourself?

  • This server hardware belongs to you (or maybe not… see tip below).
  • Sustainable Solutions is a software development company and our core business is not hardware

However, we know that if the server is not installed and configured correctly, the mSupply software and your medical supplies data is vulnerable. Therefore, in most instances, we end up playing a significant role in installing and configuring the mSupply Server.

Over recent years, with the development of reliable and relatively low-cost cloud based server solutions, more and more mSupply client / server installations have used a cloud based server. In many cases, Sustainable Solutions has provided this cloud based server as a separate service, thus relieving you of any responsibility for installation, configuration and management of the mSupply Server hardware.

Set up the physical hardware including

  • RAID 1 volume with Spare (3 disks total)
  • Separate backups volume
  • OS install with correct region, and keyboard
  • Administrator account called Sussol (mSupply server will operate from this account.

There are a number of miscellaneous server tweaks that we recommend:

Remove Windows / OEM bloatware

  • Remove all icons pinned to the Start bar except File Explorer
  • Remove / uninstall all tiles on the Windows start area

Hibernation / sleep

  • The pc can go to sleep after a few hours so change the power settings to never sleep etc. Even after setting the sleep setting to never you still must go into the advanced settings and change the hibernate setting to never: How to turn off Hibernation on Windows 10

Turn off Cortana

Cortana is unhelpful on mSupply servers. It is worth disabling - refer https://www.windowscentral.com/how-turn-cortana-and-stop-personal-data-gathering-windows-10

Automatic Updates

Turn on Windows Update Delivery Optimization

While it is good to control when Windows updates take place, it is often beneficial to use Windows Update Delivery Optimization to minimise bandwidth for Windows Updates. It is recommended to turn on Windows Update Delivery Optimization for the server.

Turn off DEP (Data Execution Protection)

Data Execution Protection (DEP) can interfere with 4D - refer 4D Knowledgebase: Tech Tip: Windows Server 2008 also uses DEP, so, we may need to adjust it - refer https://www.online-tech-tips.com/windows-xp/disable-turn-off-dep-windows/

  • Initially, try things with the default setting (Turn on DEP for for essential Windows programs and services only)
  • Then, if 4D / mSupply has issues, try Turning off DEP for all programs and services:
    • Open Command prompt (as administrator)
    • Run the following: bcdedit.exe /set {current} nx AlwaysOff

Turn off UAC (User Account Control)

User Account Control (UAC) can interfere with 4D - refer 4D Knowledgebase: Tech Tip: Windows UAC and the "Program Files" directory, so, we need to turn it off - refer https://social.technet.microsoft.com/wiki/contents/articles/13953.windows-server-2012-deactivating-uac.aspx

  • You have the option to turn off UAC via registry by changing the DWORD EnableLUA from 1 to 0 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
  • You may get a notification that a reboot is required. Reboot anyway.
  • After the reboot, UAC is disabled.

Set correct Regional settings including Keyboard, copy to 'New user accounts'

Be sure to set the correct regional settings, particularly if this is a cloud server which may be physically located in a different region to the country where the server will be used…

  • Go to SettingsTime & LanguageRegion & LanguageLanguage
  • Click on Change date, time, or number formats
  • A Region window will open, set your preferences on Formats and Location tabs.

Even if you chose the correct keyboard (normally US) during setup, another keyboard (like the UK keyboard) can sometimes still be the default keyboard. Check this by trying to type the @ character… To fix this, you will need to:

  • Add the correct language (e.g. English (Australia)). This will auto select US keyboard
  • Move it up to the default position and delete the other language option(s).

Copy to New user accounts

  • Click Administrative tab.
  • Click on Copy settings button.
  • A window entitled : Welcome screen and new user accounts settings will open.
  • Check New user accounts check box.
  • Click OK button on same window
  • Click Apply button and then OK button on Region window.

Disable system protection

There have been instances where mSupply has crashed and the Windows OS executes a system restore to a state prior to the mSupply installation / upgrade. To avoid this, disable System Protection:

Go to File Explorer → Right click on This PC → Click on Properties - > System Protection

System Protection

Go to Configure > Delete > Continue to Delete > Disable System Protection > Apply Changes

Configure Delete and Disable the system Protection Continue to Delete Apply changes

Remote connectivity efficiency - Best performance

Remote access speed gain by disabling visual effects.

  • Go to SystemAdvanced System settingsPerformance and choose Adjust for best performance.

Remote connectivity efficiency - Remove background picture

Remote access speed gain by removing the background picture on the Windows 10 sign-in screen.

  • Go to Settings (keyboard shortcut: Windows + I) > Personalization > Lock screen.
  • Scroll down and turn off the option, Show Windows background picture on the sign-in screen.

Improve Windows Explorer file visibility

To carry out some of the server configuration tasks, file visibility in the Windows OS needs to be improved from the default.

Follow these instructions to View hidden files and folders in Windows 10

While doing this, make the following changes:

  • Always show menus
  • Display the full path in the title bar
  • Show hidden files, folders and drives
  • Don't hide empty drives
  • Don't hide extensions for known file types
  • Don't hide protected operating system files (Recommended)
  • Use check boxes to select items

Install Dropbox

Sustainable Solutions recommends using Dropbox to assist with transferring installation files to the server, and as a means of moving mSupply secondary backups off site.

  • Contact Sustainable Solutions to organise a DropBox account for the server and for instructions on setting it up on the server.

Do this step first so that you can use the Dropbox folder to transfer software and files to the server.

Install Remote Support Software

Instructions for installing Remote Support software

Over the years we have used a number of applications for providing remote support to clients. As of writing this (April 2019) TeamViewer is the software that we use.

The steps that need to be followed on the host (your) computer are:

  1. Get the following three files on to the host computer.
    1. TeamViewer_Host.msi
    2. TeamViewer_Settings.reg
    3. Install in New - RUN AS ADMIN.bat(or other if provided by Sustainable Solutions)

      For convenience, we have zipped up these three files and they can be downloaded from here: http://www.msupply.org.nz/files/Teamviewer/Teamviewer_Support_deployment.zip You must extract the files from the ZIP file before following the instructions in step 4 below.

  2. Rename the host
    • It's a good idea to change the host Computer Name to something that we will recognise before the running the TeamViewer MSI package (Control Panel > System and Security > System > Advanced system settings > Computer Name > Change…). A name that reflects the site and / or user would be useful.

      The Computer description is NOT the Computer Name.

  3. Uninstall any existing TeamViewer installation if it is older than v14.1.
    • Public instruction from TeamViewer states that older versions of TeamViewer must be uninstalled before installing this version. If possible, please do this. However, it has been found that the TeamViewer Host package can be successfully installed on top of any version of TeamViewer. It may result with multiple TeamViewer entries in the installed programs list, which is messy, and may result in long-term issues. You have been warned.
    • It is safest to uninstall TeamViewer before installing the new TeamViewer Host.
  4. Execute the batch file As Administrator - refer to method 3 of 9 ways to run programs as administrator in Windows.
    • You must execute the batch file As Administrator. It will not work unless you do.
    • It is not enough to be logged in to a Windows Administrator account and run the batch file 'normally'.

The Teamviewer Customised Host window should appear on the host screen:

Advise Sustainable Solutions once you see this and they will then be able to confirm that remote access is operational.

2019/04/03 23:08 · Mark Glover

Install UPS hardware and software

If its not already done, install the UPS hardware and software, refer UPS above.

Install Anti-virus software

Anti-virus can be a hotly contended issue. This web page is pretty convincing: What’s the Best Antivirus for Windows 10? (Is Windows Defender Good Enough?)


  • If the OS is Win8 or later, Windows Defender is probably good enough for anti-virus, and better than much of the competition.
  • Once configured, the server should not be vulnerable to exploit programs as these are usually downloaded and triggered by human activity! However, to be safe, it is recommended to install an Anti-exploit program such as Malwarebytes. The website suggests that Malwarebytes is not free, but as at the time of writing this (May 2018), Malwarebytes successfully reverts to a free version after the 14 days trial. This means that it has to be manually run.

Install another Web browser

If you're not a fan of Microsoft Internet Explorer, (12 reasons not to use Internet Explorer, ever) then install another browser. Good options include:

Pin the browser to the Taskbar.

Install LibreOffice

mSupply can produce reports in Microsoft Excel format. Client machines will need to have software to open these reports. Occasionally there will be need to run and open these reports while logged in to the Server. If you do not have Microsoft Excel installed on the server, a good option is:

It's a good idea to stick this in to the Dropbox

Install TurnedOnTimesView

As part of troubleshooting, it is valuable to be able to analyse when the server has shut down ungracefully.

  • TurnedOnTimesView is a simple tool that analyses the event log of Windows operating system, and detects the time ranges that your computer was turned on and whether the last shutdown was graceful or not.
  • Installation instructions are on the website, but is very straightforward:
    • Copy the TurnedOnTimesView.exe file to the Desktop
    • Pin it to the Taskbar.


It's a good idea to stick this in to the following folder in Dropbox:

  • TurnedOnTimesView

Install Logoff and Lock utilities

It is too easy for support workers accessing the server remotely to accidentally shutdown the server. Therefore, two Windows shortcuts have been created to allow support workers to easily logoff or lock their windows session without having to go through the usual Windows procedure:

  • Lock computer
  • Logoff computer

Lock / Logout utilities

It's a good idea to stick this in to the following folder in Dropbox:

  • Lock Logout Shortcuts

The Yellow Lock computer utility needs to be copied to the Admin desktop and then pinned to the task bar.

The Green Logoff computer utility needs to be copied to the C:\Users\Public\Desktop folder. This will place the shortcut on the desktop of each normal user. Users of each normal user account will need to pin this shortcut from the desktop to the taskbar. Don't pin it to the taskbar of the Admin user account. We try to keep the Admin account open so as to keep Dropbox working.

The C:\Users\Public\Desktop folder is normally a hidden folder. You will likely need to make it visible).

Configure Interactive Services Detection

How-to Geek has a helpful article on Understanding and Managing Windows Services which appears to be updated frequently with changes in Windows OS.

Interactive Services Detection is a means by which support workers can interact with the mSupply Service to investigate issues.

From What is Interactive Services Detection and Why is it Blinking at Me?:

Services and system processes run in session 0. Prior to Vista, the console (first logged on user’s desktop) ran in session 0 as well. Vista introduced session 0 isolation to protect services from elevation of privilege exploits from the console desktop. Now, the first user’s desktop runs in session 1.

Interactive Services Detection (the blinking button on the taskbar) is a mitigation for legacy applications that detects if a service is trying to interact with the desktop. This is handled by the Interactive Services Detection (UI0Detect) service.

Since Windows 10 V1803 and Server 2019

Microsoft has removed the Interactive Services Detection Service on Windows 10 Version 1803 and Server 2019.

We now recommend FireDaemon Zero (Session 0 Viewer) as an alternative means of interacting with the mSupply Service. Refer to this deployment matrix. The utilities are here: Firedaemon


  1. Make sure the OS is fully updated.
  2. Install Firedaemon Zero 2.5 (in the Firedaemon utilities, above)
  3. Install Firedaemon Zeroinput to restore Keyboard/Mouse control. Right click on the FDUI0Input.inf (in the Firedaemon utilities, above) and select Install.
  4. RESTART THE MACHINE The FDUI0Input.inf driver will not take effect until the machine is restarted.
  5. Double click on the red Firedaemon Zero icon on the task bar to go to Session 0 (Interactive services):

  • In Session 0 Double-click the Firedaemon Zero icon to get back. Or it will automatically go back in 30 seconds of inactivity.
  • If mouse and keyboard are working on Session 0 you can turn off Firedaemon Zero 'Quirk' pref to exit session zero after 30 seconds. Right-click on the red icon and click on Options. Then on “Quirk” just uncheck the option. Done.\\

    If you turn off Firedaemon Zero 'Quirk' pref to exit session zero after 30 seconds before installing Keyboard/Mouse driver, plan for a physical trip to site to fix it! ;-))

If you are upgrading from a previous version...

If you are upgrading from a previous version of mSupply, first perform a data backup:

  • With mSupply server open as an application click on File> Backup…. This will generate a backup file of your current data with file extension .4bk.
  • Copy this file to at least one safe place, e.g. USB drive, a cloud service such as Dropbox.
  • Continue only when the .4bk file has completed transfer to the remote location.

Moving from pre v3.50?

There was a major upgrade of mSupply's internal structure in v3.50. If you are upgrading from a pre v3.50 installation of mSupply, Sustainable Solutions will need to convert your data so that it can be read by mSupply versions after v3.50. This conversion process is provided free of charge.

Obtain and run the mSupply Server installer

The client/server version of mSupply has two installers:

  • One installer, with the word Server in the title, is used to install the mSupply Server software on a single server computer.
  • The other installer, with the word Client in the title, is used to install the mSupply Client software on as many computers as you wish including on the server computer. You will be limited in how many clients can connect at any one time by the server licence you have purchased.

You must be logged on as Administrator to install mSupply Server with the correct permissions. Please consult your IT support staff if you require assistance to achieve this.

Once you have obtained the mSupply Server installer file, double click it to install. Here is what the mSupply server installation window should look like:

  • You may be asked by the OS whether 'you want to allow this app to make changes to your device?'. Click Yes
  • At the mSupply Server Setup Welcome screen, click Next
  • To proceed with the installation, you will need to click on the 'I agree to the terms of this license agreement' radio button and click Next
  • Unless you have good reason to do otherwise, don't change the installation folder, and click Next
  • Unless you have good reason to do otherwise, don't change the Shortcut folder, and click Next
  • At the Ready to Install window, click Next
  • After some time (minutes!) you will be shown the Installation Successful window. Click Finish

What is installed where:

We strongly recommend you do not change the default installation directories, which are as follows:

  • mSupply Server: C:\Program files\mSupply\mSupply Server
  • mSupply Client (see Installing mSupply Client below): C:\mSupply Client
mSupply Server installer also installs the following files and folders:

Starting the Server for the first time

There is no point in carrying out the following steps unless:

  • You have the the license registration number (or file)
  • You are ready to create a new mSupply data file, or you have one to load.

Registering the 4D License

  • mSupply is built on the 4D database engine. 4D Licenses are required for the Client - Server operation.
  • You will need the license registration file(s) sent to you by Sustainable Solutions and paste them to the following folder:
    • C:\ProgramData\4D\Licenses
  • Alternatively, if Sustainable Solutions staff have remote access to your server, they can apply the license.

Run mSupply Server

We need to run mSupply Server as an application until all configuration is completed. Don't run as a Service now as some configuration functionality is not enabled when run as Service.

We need to run the mSupply Server software as Administrator.

There should be a shortcut on the Desktop called mSupply Server.

Right-click on the icon and select Run as administrator

At this point you will normally be prompted to enter 4D license information.

You will then be presented with the following dialogue box:

Click Create to create a new data file or Open to choose an existing data file. The below image shows an existing data file.

Since Windows version 1803 and following, there can be issues with permissions to access folders located in individual user folders such as under My Documents. Therefore, it is now highly recommended to save your data file in the folder: C:\ServerName_mSupply_data replacing ServerName with the mSupply server (site) name, eg. C:\Hagen_AMS_mSupply_data.

You may get a question from the Windows Firewall requesting permission for mSupply to communicate through the Firewall.

Allow mSupply to communicate on both private and public networks.

If the above steps have succeeded, you should see the 4D Server Administration window:

Configure Backups

  • Select Maintenance and then, under the 'band' titled Last backup select Preferences.
    • Scheduler: Set Automatic Backup: to Every day, at 20:00 or later, as long as it is a time when work is likely to be finished. It will have to be set earlier, say 16:00 if the server is switched off of an evening.
    • Configuration:
      • Content:
        • tick Data File
        • untick Structure File
        • untick User Structure File
        • Delete all 'Attachments':
  • Backup File Destination Folder
    • If on physical hardware, this should be a separate physical disk (e.g. D:\mSupply_backups).
    • If on a virtual machine, it is meaningless to have a separate physical disk, and it should be C:\Users\Administrator\Documents\mSupply backups.
  • Log Management: Set .journal to the same parent folder as the backups.
    • If on physical hardware, this should be a separate physical disk (e.g. D:\mSupply_journal).
    • If on a virtual machine, it is meaningless to have a separate physical disk, and it should be C:\Users\Administrator\Documents\mSupply journal. *

If a location of the log file is already specified, and you want to change it, you need to untick the “Use Log” tick-box and then when you re-tick it you will be prompted for a new location.

  • Backup & Restore
    • General settings
      • tick Keep only last 60 backup files. Of course if the drive you are backing up to doesn't look like it will have 60x the space one backup file will need then lower the number appropriately.
      • tick Backup only if the data file has been modified
      • Delete oldest backup file after backup
      • If backup fails: select Retry after 60 Seconds
      • tick Cancel the operation after 5 attempts.
    • Archive
      • Segment Size (Mb): None
      • Compression Rate: Compact
      • Interlacing Rate: None
      • Redundancy Rate: None
  • Automatic Restore
    • tick Restore last backup if database is damaged
    • tick Integrate last log if database is incomplete
  • Click OK

You will see the following dialogue box:

  • Click OK to create the first backup.

Configure Cache

Edit > Database Settings > User settings for Data file

User Settings

Select Database and then set up the cache memory.

  • Tick Calculation of adaptive cache
  • Memory to be reserved for other applications and for the system: = 512 MB (default?)
  • Percentage of the available memory used for cache = 100%. According to the 4D v16.5 Database/Memory page, 'Percentage of the available memory used for the cache = 100% since there is only one 4D Server application.' If other applications running on the server need additional RAM, it should be added to the figure above.
  • Minimum size = 1,000 MB (default?)
  • Maximum size = can be set to any number, including greater than available RAM. If this number is greater than the available RAM, 4D will adapt the size of the cache according to the actual available RAM.
  • Flush Data Buffers every: 10 Minutes


  • Exit 4D Server Administration window.
  • Check that the settings.4DSettings file has been created in the <DataFolder>/Preferences folder

Enter Extra 4D serial numbers

When you registered 4D server the licence allowed 2 concurrent connections. If you have purchased extra connections, you should enter the serial number(s) now.

Choose Help > Update licence. This window is shown:

Click the Add button to enter additional licences.

If you haven't already done so, configure Interactive Services Detection.

The server should now be set to start automatically when the machine is turned on. This can be accomplished by setting the server to run as a service. Choose File > Register Current Database as Service.

If the Register Current Database as Service option is greyed out, you are probably not running the mSupply Server as Administrator. You need to quit the server and run as Administrator.

Once you have registered the Current Database as Service, Quit the 4D Server Administration window by clicking the close box on the top right (or choose File > Quit from the menus). You will then be shown a disconnect window something like this:

Type 0 into the box, and click OK . The server will quit.

Pin Services to the taskbar

It is important to be able to quickly observe the status of the 4D / mSupply Service. Therefore, we pin Services to the taskbar:

  • Click Windows icon
  • Type Services
  • Right-click the Services Desktop App
  • Select Pin to taskbar

Configure mSupply Service settings

Click on Services in the task bar. You will be shown a window like this.

Double-click on 4DServer: mSupply - fortunately it is usually the first item in the list!

You will be shown the 4DServer: mSupply service properties window. Change the Startup type in the drop-down list to automatic (Delayed start).

on the Log On tab, the settings should be as shown below:

  • Make sure “Log on as” is set to “local system account” (or LSA for short)
  • Make sure “Allow service to interact with desktop” is checked.
  • Click OK to return to the list of services.
  • Close the Services window

Help the mSupply Server Service find the data file

Depending on the Windows version, the Local System Account may not have permissions to access the mSupply data file if it is not in the default location (in the Admin user's Documents folder). To fix this, the following steps are required:

  1. Download PSTools to the server
  2. Extract to C:\PSTools
  3. Run the Command Prompt As Administrator
  4. At the prompt, type cd C:\PSTools <Enter>
  5. Type psexec -i -s cmd.exe <Enter> This will open a new Command Prompt window.
  6. In this new window, type whoami <Enter> You should see the following: nt authority\system If you don't, something has gone wrong. Close all Command Prompt windows and start again.
  7. Type cd c:\Program Files\mSupply\mSupply Server <Enter>
  8. Type mSupply.exe <Enter> The mSupply Server will open, prompting for the data file location:
  9. Click OK. The Select a 4D Data File window will come up, immediately followed by the Location is not available error message:
  10. Click OK on the error message window, and then select the correct datafile. The mSupply.4DC - 4D Server Administration window should open.
  11. <Ctrl>-Q to exit mSupply Server
  12. Close both Command Prompt windows

From now on the 4D server should start automatically when the machine is turned on. There is no need to log-on to the machine.

Manually starting the mSupply Server Service

  • To manually start the mSupply Server Service, double-click the “Services” shortcut you made on the desktop, highlight the 4D server service, and click the triangular “start” button (looks like a “Play” button on a media player)

If clicking the Start Service button results in the Error 1: Incorrect Function, a registry edit (regedit) is necessary. Please only do this if you are confident and familiar with editing the registry. mSupply Support can help with this. Edit registry value:

  Path: SYSTEM\CurrentControlSet\Control\Windows
  DWORD: NoInteractiveServices

Change value 1 to 0

Once finished editing the registry, close regedit and return to the list of services and start the ISD service. It should now start!


Check that mSupply server is running correctly in Session 0:

  1. If you don't see mSupply server on Session 0 - Get back to Services and check 4D server properties:
    • LogOn should be set as “Local System account”
    • Enabled option “Allow service to interact with Desktop”
  2. Check if any Error window is showing up and need a OK confirmation to continue.
  3. Check if the datafile needs to be selected because it has changed folder.
Since 4D v17

Since v17 of 4D (the database engine underlying mSupply), when running mSupply as a Service, logging on as the Local System Account (LSA, as described below), mSupply MAY no longer have sufficient permissions to access the folder: C:\Program Files\mSupply\mSupply Server\Server Database\Preferences\Backup

If this is the case, it will result in the following error (which can only be seen in Session0):

If this happens, it needs to be fixed. The Solution is to edit permission of Users to allow Full control/Modify/Write to the Backup.XML file as shown here:

Manually stopping the mSupply Server Service

  • To manually stop the mSupply Server Service, first make sure clients are not connected, then double-click the “Services” shortcut you made on the desktop, highlight the 4D Server service, and click the square “stop” button (looks like a “Stop” button on a media player)

Manually starting the Service

Despite being configured so, the mSupply Service sometimes will not start when the server hardware starts. The service can be started through the Services:

From this point there should be no need to revisit any of the above procedures to operate mSupply. However, if you are testing, or starting a data file for a second organisation, you may wish either to change the data file mSupply is using or to create a new file.

The mSupply program (the files named “mSupply.4DC” and “mSupply.RSR”) store the path to the last data file used, and the next time mSupply is started, the previous data file that was open is opened again unless there is user intervention or the “old” data file has been moved to a new location.

To intervene, hold down the “alt” key as the 4D server starts up.

You will be shown the standard open/save window:

To create a new data file, click the “New” button.

To select an existing data file, navigate to the file's location then click the “Open” button.

Installing mSupply Client

Needed: mSupply Client software of the same version (or relatively recent) as the mSupply Server.

  • The mSupply server should run as a service on the server computer - see above. If any user needs to use mSupply on the server (not recommended, but possible, and sometimes necessary) then they should not be running the mSupply Server software. They should run the mSupply Client software, which should be made available to all user accounts.

OS date settings

Generally, mSupply will interact correctly with the local OS in terms of date format. However, as OS versions continue to evolve and handle dates differently, sometimes this does not work. We have found that very occasionally, if the OS date format is set to DD-MMM-YY (e.g. 20 APR 2020) then mSupply will not always handle the date well. It is recommended to set the system date to DD-MM-YY.

Obtain and run mSupply Client installer

You must be logged on as Administrator to install mSupply Client with the correct permissions. Please consult your IT support staff if you require assistance to achieve this.

  • Once you have obtained the mSupply Client installer file, double click it to install.

The mSupply client will be installed in the folder C:\mSupply\mSupply client on your computer.

mSupply client installer also installs the following files and folders:

  • A shortcut on the Desktop called mSupply client.
  • A folder called “\4D\Network” in the Windows folder on the startup volume, which contains network component files that need to be present for 4D to communicate over a TCP (and other types of) network(s).
  • Note that no reports are installed on 4D client. Each time 4D client connects to the Server, reports that have been added or modified on the server are automatically copied to the client.
  • Note that the installers have been set up to overwrite existing files, so reinstalling the software will restore any potentially corrupted files to their original state. The installer will not overwrite your data files, unless you have been unwise enough to name your data file “example data” and put it in the “example data” folder;-).

For convenience, pin the mSupply client desktop shortcut to the taskbar.

If any other Windows users will use this computer to access mSupply, it is worth copying the mSupply client desktop shortcut to the C:\Users\Public\Desktop folder. This will place the shortcut on the desktop of each user. Each user will need to pin this shortcut from their desktop to the taskbar.

The C:\Users\Public\Desktop folder is normally a hidden folder. You will likely need to make it visible).

Starting the mSupply Client

Once the installation is completed, double-click the “start mSupply Client” shortcut on your desktop. A window something like this should appear:

The window lists available mSupply servers on your network (there should be only one!) Click on the server you wish to connect to.

  • Once you have connected successfully, the mSupply Client 'remembers' which Server you last connected to and stores this in the Recent tab. Whenever you run the mSupply Client, it will automatically connect to that server.
  • If, mSupply Client cannot connect to the mSupply Server, this window will pop up showing the Recent tab. You can try choosing the server there.
  • If, for some reason, network settings have been changed and you cannot connect from the Recent tab, remember to look at the TCP/IP tab as well.

Clicking the “OK” button will take you to the mSupply password entry window. For new data files, the password is user1 for the first user in the list. Click on the first user, then enter the password and click OK

mSupply Client software can not see the mSupply Server?

Server is not visible?

  • To make it easy for you to connect, mSupply Server publishes details about available servers on a specific port. It is quite possible that products such as “Zone Alarm” and “Norton Personal Firewall” will block access to this port and stop discovery of the servers. Contact your system administrator if the list of available servers is blank.
  • Of course, it may be possible that the mSupply Server service is not running. Check Services to establish that.
  • Lastly, the Windows firewall may be blocking the Server publishing it's presence - see below.

Configuring Windows firewall on server

The Windows firewall may need to be adjusted to allow the Client to receive Server identification.

From the 4D tech email list:

  • When you launch 4D client, it broadcasts a udp message on the subnet, requesting all 4D servers to identify themselves.
  • The UDP message is sent from a random port to a destination port = 19813 (default)
  • When responding, each 4D server replies with a UDP unicast message from its address to the client's address with source port = 19813 and destination port = whatever port the client had used to broadcast.
  • So in order to let the client receive the answer back from the server, one has to punch a hole in the firewall for all UDP packets with a source port of 19813.

mSupply Server Configuration

Register mSupply

The procedure is described earlier in “Preferences” chapter of the mSupply manual. See The Register button

You will either have to phone or email the information to Sustainable Solutions to obtain a registration code.

The registration code is keyed to your Organisation name and the MAC address of the server. Changing either of these will require a new code, which we shall willingly provide. So, take care when setting the Organisation Name!

Configure mSupply Preferences

Once registered, you may want to systematically to go through the mSupply Preferences and choose appropriate settings, and particularly setting up the Secondary backups! Start here: Preferences > General

Your installation of mSupply may have customisations made specifically for your work scenario. Please contact our support staff on support@msupply.org.nz to manage these customisations.

Configure label printer

If you are dispensing, you will need to set up label printer preferences

Upgrading to a newer version of mSupply

User Access Control, a feature of Windows 7, requires that the undernoted steps are followed when you are upgrading mSupply

  1. In Windows 7 click Start Menu> Control Panel> User Accounts
  2. Click 'Change User Account Control Settings'
  3. In the window that appears move the slider to the bottom and hit OK
  4. You will be requested to restart the computer - do so(!)
  5. If you copied the files already (which wont work as the pseudo copy occurs) these copied files should now automatically work

Graceful shutdown in the event of a power failure

Your mSupply server should be attached to a UPS. The UPS should be fitted with a control cable (serial, USB or network cable) that allows control software to detect a low power situation and shut down the server.

In the UPS control software set the shutdown to start at least two minutes before the power will fail.

Set it to run a batch file at that point. The file should contain the single line “net stop Service name” where the service name is the name displayed in the properties when you double-click the service name in the services window. In the example below the service name is “4DS mSupply.4DC” (not to be confused with the display name)

You may wish to test your typing skills by opening a command prompt:

Accessing a cloud hosted server

Access to a cloud hosted mSupply server is through the Windows Remote Desktop Protocol.

Windows client

If the mSupply client software is running on a PC, there are a range of applications that can be used for accessing the cloud hosted mSupply server including Microsoft's own Remote Desktop Connection software that comes included with Microsoft Windows. There are third party implementations that provide additional security and controls. One that we are currently (2016) finding effective is TS-Plus.

Macintosh Client

Access to the the Microsoft Remote Desktop App is available on the Apple Store: https://itunes.apple.com/en/app/microsoft-remote-desktop/id715768417?mt=12

  • The Display Name is the name that will appear on your computer. We suggest you make it: mSupply Remote Access
  • The Computer Name is the name of the domain name of the mSupply server computer that you are connecting to.

Previous: Managing Data Files Next: Configure Dispensary mode

  • Last modified: 2019/07/04 08:05
  • by Mark Glover