State of knowledge

July 2020

If links in the ProCall call window should not be opened with the default browser, but for example with Google Chrome, Mozilla Firefox or Microsoft Edge, you can customize the call window and define the browser.

In general, you can customize the call window using a custom URI (Uniform Resource Identifier) as a call parameter to call not only https: or http: pages, but also other applications.

Some important notes on the procedure and an example are described below for orientation.

The described procedure requires knowledge in programming, configuration and administration and the corresponding authorizations. 

Procedure

Generate unique non-public URI

Define a unique and not yet assigned URI that is not publicly known.

To start the Microsoft Edge browser, you can use the URI Microsoft Edge followed by the address bar, e.g. microsoft-edge:https://www.google.com. You then do not need any further steps in the procedure, as this is an integral part of Windows.

URIs that are already used and therefore not available for further use can be found at https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml.

Format

The format of the URI must follow the scheme from RFC3986 (https://tools.ietf.org/html/rfc3986#section-3.1), i.e. consists of any sequence of letters, digits, plus signs (+), dot signs (.) or hyphen signs (-), starting with at least one letter.

Implement a program or script

Implement the program or script that will launch your browser or application.

Executable

The program or script must be executable on the computer and by the user where the URI is to be used.

The program will be started with the user rights when the URI is opened and will contain the URI as a call parameter.

The program can be used for different URIs at the same time because the whole URI is passed and different actions can be executed based on different URIs.

Registration of the URI and the application to the operating system

To establish the link between the individually defined URI and the program, the link must be made known to the operating system.

Implementation by means of an example: Open alternative browser in a web page

In a web page, an alternative application is to be opened via an individual URI "x-5t4r7my4pp". Use "x-defaultbrowser" to open a web page using the user's default browser.

Example URI

The URI x-5t4r7my4pp (x-startmyapp) has been mapped cryptically to make it harder to misuse. We also register a second URI x-defaultbrowser to open the default browser with any URL.

The example as a web page looks like this.

Download: mylaunchscript.html

<!DOCTYPE html>
<head>
	<meta charset="utf-8"/>
</head>
<script type="text/javascript">
"use strict";

function x5t4r7my4pp() {
  // Used babeljs.io as transpiler
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
	args[_key] = arguments[_key];
  }
  window.open(encodeURI("x-5t4r7my4pp:" + args.join('§')), '_top');
}

function xdefaultbrowser(url) {
  window.open(encodeURI("x-defaultbrowser:" + url), '_top');
}
</script>
<html>
	<body>
		<a href="x-5t4r7my4pp:https://www.google.com§Berlin§Leonberg§Starnberg§Olching§Udine">Start My App</a><p/>
		<a onclick="x5t4r7my4pp('https://www.google.com','Berlin','Leonberg','Starnberg','Olching','Udine')" style="color:red;text-decoration:underline;cursor:pointer;">Start My App</a><p/>
		<a href="x-defaultbrowser:https://www.estos.de">Open estos Homepage in Standard Browser</a><p/>
		<a onclick="xdefaultbrowser('https://www.estos.de')" style="color:red;text-decoration:underline;cursor:pointer;">Open estos Homepage in Standard Browser</a><p/>
		<a href="microsoft-edge:https://www.google.com">Open Google Search in Edge</a>
	</body>
</html>
XML

Example script

The following example is a Windows batch script that converts our two URIs x-5t4r7my4pp and x-defaultbrowser into program calls.

Download: mylaunchscript.bat

mylaunchscript.bat

@rem MIT License
@rem 
@rem Copyright (c) 2020 estos GmbH
@rem 
@rem Permission is hereby granted, free of charge, to any person obtaining a copy
@rem of this software and associated documentation files (the "Software"), to deal
@rem in the Software without restriction, including without limitation the rights
@rem to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@rem copies of the Software, and to permit persons to whom the Software is
@rem furnished to do so, subject to the following conditions:
@rem 
@rem The above copyright notice and this permission notice shall be included in all
@rem copies or substantial portions of the Software.
@rem 
@rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
@rem IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@rem FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@rem AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@rem LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@rem SOFTWARE.
@echo off
setlocal ENABLEDELAYEDEXPANSION
rem **************************************************************************
rem * 
rem *  WICHTIG: Kodierung des Editors auf Westeuropäisch CP850/OEM850 stellen
rem *  WICHTIG: Diese Datei nicht als UTF-8 speichern
rem *  
rem **************************************************************************
rem UTF-8 Kodierung für § (Paragraph) Zeichen
set "searchstr=%%C2%%A7"
rem Das § (Paragraph) Zeichen als Trennzeichen zwischen Parametern
set "replstr=§"
rem Aufrufparameter überarbeiten um das § (Paragraph) Zeichen als Trennzeichen nutzen zu können
set "cmdparams=%1"
if "P%cmdparams%"=="P" goto :endlocal
set "cmdparams=!cmdparams:%searchstr%=%replstr%!"

rem Trennen zwischen URI und dem Rest
rem msg "%USERNAME%" "DEBUG: cmdparams='%cmdparams%', searchstr='%searchstr%'"
for /f "tokens=1,* delims=:" %%a in (%cmdparams%) do set "uri=%%a"&set "params=%%b"

rem Abhängig von der URI zu der entsprechenden Stelle springen
rem msg "%USERNAME%" "DEBUG: uri='%uri%', params='%params%'"
if "P%uri%"=="Px-5t4r7my4pp" goto x5t4r7my4pp
if "P%uri%"=="Px-defaultbrowser" goto xdefaultbrowser

rem Info-Fenster mit Informationen über nicht erkannte URI öffnen
msg "%USERNAME%" "ERROR: uri='%uri%', params='%params%', cmdparams='%cmdparams%'"
exit /b 1

:x5t4r7my4pp
rem Die ersten drei (1,2,*) Aufrufparameter getrennt durch Trennzeichen ermitteln
for /f "tokens=1,2,* delims=%replstr%" %%a in ("%params%") do set "parm1=%%a"&set "parm2=%%b"&set "parms=%%c"

rem explorer "microsoft-edge:%parm1%"
rem "C:\Program Files\Internet Explorer\iexplore.exe" "%parm1%"
rem "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "%parm1%"
msg "%USERNAME%" "DEBUG x-5t4r7my4pp: parm1='%parm1%', parm2='%parm2%', parms='%parms%'"
goto :endlocal

:xdefaultbrowser
rem msg "%USERNAME%" "DEBUG x-defaultbrowser: address='%parmas%'"
explorer "%params%"
goto :endlocal

:endlocal
exit /b 0
TEXT


Example registration

The Windows batch script is stored in the folder "c:\Users\Admin\mylaunchscript.bat" and a shortcut is created for the URI "x-5t4r7my4pp" and "x-defaultbrowser" in the Windows Registry. In addition, the initial Internet Explorer security prompt is disabled on behalf of the current user and the two URIs.

Download: mylaunchscript.reg

mylaunchscript.reg

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\x-5t4r7my4pp]
@="URL: Launch My Script"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\x-5t4r7my4pp\shell]
[HKEY_CLASSES_ROOT\x-5t4r7my4pp\shell\open]
[HKEY_CLASSES_ROOT\x-5t4r7my4pp\shell\open\command]
@="cmd /c start /min C:\\Users\\Admin\\mylaunchscript.bat \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\ProtocolExecute\x-5t4r7my4pp]
WarnOnOpen=DWORD:0

[HKEY_CLASSES_ROOT\x-defaultbrowser]
@="URL: Launch My Script"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\x-defaultbrowser\shell]
[HKEY_CLASSES_ROOT\x-defaultbrowser\shell\open]
[HKEY_CLASSES_ROOT\x-defaultbrowser\shell\open\command]
@="cmd /c start /min C:\\Users\\Admin\\mylaunchscript.bat \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\ProtocolExecute\x-defaultbrowser]
WarnOnOpen=DWORD:0
TEXT


Additions

Proactive disabling of the security prompt in Microsoft Internet Explorer (ProCall)

The first time you use the URI, a security prompt appears in Internet Explorer:

The following Windows PowerShell script can be used to pre-check (and thus answer) the security prompt "Always confirm before opening this address type" for a Specific User ($env.USERNAME) in the administrator's context. Alternatively, HKEY_CURRENT_USER can be used in the context of the user (see mylaunchscript.reg example above).

disableiequestion.ps1

# MIT License
# 
# Copyright (c) 2020 estos GmbH
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
$sid=(New-Object System.Security.Principal.NTAccount($env:USERNAME)).Translate([System.Security.Principal.SecurityIdentifier]).Value
$path="Registry::HKEY_USERS\$sid\Software\Microsoft\Internet Explorer\ProtocolExecute\x-5t4r7my4pp"
New-Item -Path $path -Force | Out-Null
New-ItemProperty -Path $path -Name WarnOnOpen -PropertyType DWord -Value 0 | Out-Null
TEXT