1. Home
  2. MapEdit Desktop
  3. Call MapEdit from other programs

Call MapEdit from other programs

There are two ways to call MapEdit from other programs or from a web page.

Both have in common that these programs are located in the same directory we need the MapEdit start programs (e.g. MapEdit.exe) and the configuration file MapEdit.ini.

With both variants the URL parameters can be used to start MapEdit Desktop.

MapEdit.RemoteControl.exe

This method is recommended. It has advantages over the second variant listed below, which we also offer.

For this purpose, an entry is created in the registry on each client PC. This can be done manually (as admin) or by software distribution for all centrally.

Required registry entry:

..........
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mapeditdesktop]
@="URL: MapEditDesktop Protocol"
"URL Protocol"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mapeditdesktop\DefaultIcon]
@="C:\\Program Files (x86)\\MuM MapEdit\\MapEditDesktop\\MapEdit.RemoteControl.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mapeditdesktop\Shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mapeditdesktop\Shell\Open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mapeditdesktop\Shell\Open\Command]
@="\"C:\\Program Files (x86)\\MuM MapEdit\\MapEditDesktop\\MapEdit.RemoteControl.exe\"\"%1\""
..........

In our download area in the directory MapEdit/Support you will find an example for the registry on the client, which you can use as a template.

Only the path has to be adjusted where the MapEdit.RemoteControl.exe is located. This can be a local directory, network drive, or a UNC path. In the example above the default installation path of MapEdit Desktop is set.

To call MapEdit via this variant, the program or a web page must be addressed as follows:

mapeditdesktop://Execute?

Behind the ? you can set the known parameters to start MapEdit Desktop. Example:

mapeditdesktop://Execute?Username=ADMINISTRATOR&Password=123456

If MapEdit Desktop is not called from a browser, but from another program, then these parameters must be separated by ~ instead of &.

MapEdit.RemoteControl.Listener.exe

This method can be used if an own protocol / registry entry is not possible.

The MapEdit.RemoteControl.Listener.exe is included in the autostart of the client PC, so that the process always runs at the start of the PC. The program listens to port 60026. This port can be adjusted if it is already in use or cannot be used. To change the port a file named MapEdit.RemoteControl.Listener.ini has to be created and the desired port number has to be entered into it e.g. Port=60027.

Example:

http://localhost:60026/Mum.Geo.Services/RemoteControl.html?

Behind the ? you can set the known parameters to start MapEdit Desktop. Example:

http://localhost:60026/Mum.Geo.Services/RemoteControl.html?Username=ADMINISTRATOR&Password=123456

It must always be called as “localhost”, because MapEdit Desktop runs locally on the client PC.

If MapEdit Desktop is not called from a browser, but from another program, then these parameters must be separated by ~ instead of &.

Advantages and disadvantages

The MapEdit.RemoteControl.exe works without problems in all environments, no matter if the MapEdit is installed on terminal server, virtual computer or “bare metal”. It doesn’t need an open port.

With MapEdit.RemoteControl.exe you register your own protocol and start MapEdit Desktop directly with it. The advantage is that it does not have to start a process that always runs in memory. Nothing can be ended unintentionally or not run.

The MapEdit.RemoteControl.Listener.exe does not work on terminal servers because it always opens a defined port 60026. The port can be adjusted in the ini, but this must be adjusted with all other applications that are installed.

There must be no entry in the registry of the client PC for the MapEdit.RemoteControl.Listener.exe. It is sufficient that the programs are started in the autostart of the client PC.

Updated on December 13, 2019