REMOTE EXECUTER FOR CITRIX / RDS - FREEWARE

Remote Executer for Citrix / Remote Desktop Services (Terminal Server) is a small utility program that can execute a command line on the client machine from a remote session on the Citrix / Terminal Server. Using this utility, user can launch any program with parameters on the client side. The program can be also configured to redirect http (https, ftp, ftps) link from server to open on the local machine.

This utility program provides similar Citrix's "Host to client redirection" feature on Terminal Server with Remote Desktop Services to:
- Run a program/command line with parameters on local/client machine (like Citrix Local App Access)
- Open a document file (PDF, Word, Excel, etc) with default associated program on the local/client machine
- Print a document file (PDF, Word, Excel, etc) on the default printer installed on the local/client machine
- Redirect url or any protocol (http, https, ftp, callto, tel, skype, etc...) to open (in the browser) on local/client machine
- Redirect http link with the possibility to filter out specific links with Black List or White List
- Redirect url in an Outlook email or in a Word document (or Excel, Acrobat Reader, etc) to open on local machine
- Redirect mailto command from Terminal Server/Citrix to create new email on local/client machine
- Can be used with Remote Desktop Services, Citrix XenApp, XenDesktop, Microsoft Azure RemoteApp (will be replaced with Citrix XenApp Express)
- Compatible up to Windows 10 / Windows 2016 RemoteApp

Use case examples:

1 - When installing Open Dental program (open source for Dental domain http://www.opendental.com/) on Remote Desktop Services Host Server as a RemoteApp, there is possiblility to create a "Bridge" to other programs. Among these programs, Apteryx XrayVision (http://www.apteryx.com/) is one of most popular softwares as Xray Image Viewer. Usually the Xray Images and the Xray machine are installed in the local office. In that case Remote Executer can be used to send a command line from RDSH Server to the local machine to launch the Xray Viewer program.

2 - When running a published RemoteApp program, the real instance of the that program is running on the server. What end user sees on his/her screen (local machine) is a refreshment graphic image of that program screen on the server, that why when a RemoteApp program with heavily use of graphic like a webpage with Flah, Youtube video or high definition photo the machine might become unresponsive, servers resources will be heavily consumed. In this case, the best solution is to redirect the webpage with the flash or video to run on the local side. With Remote Executer, it's possible to configure for all the YouTube  pages will be launched in the browser on the local machine by using WhiteListe option.

Download the document for more detail.

Notes: for Citrix, the FREEWARE version of Remote Executer works only with Windows 2008/R2 and previous version. A commercial version with no limit is available. Email to request a demo version.


- After the installation, from a DOS Command Prompt, to open a text file with Notepad program on local machine type:
RemoteExecuter Notepad.exe C:\My Documents\MyTextFile.txt

- To open any document file (Word, Excel, Jpg, PDF, etc) with the default associated program on the local machine, just specify the file name as argument:
RemoteExecuter MyWordFile.doc
RemoteExecuter "C:\My Documents\MyPDFFile.pdf" (with space in the path/file name)
 
- To print any document file (Word, Excel, Jpg, PDF, etc) on the default printer installed on the local machine:
RemoteExecuter print "C:\My Documents\MyWordFile.docx"

-To open a website on the client side, just specify the URL as argument
RemoteExecuter http://www.microsoft.com

-To create a new email on the client side by using mailto protocol:
RemoteExecuter "mailto:myaddress@hotmail.com?subject=Email Subject&body=Email Body"


CONFIGURATION FOR REDIRECTING HTTP/HTTPS TO CLIENT SIDE:

It may be configured on the server to redirect URLs to open on the local machine with the possibility to filter out certain links.

- To redirect http link (or http, https, ftp protocols) from server to client we have to modify Windows Registry on the server:

Please backup your registry before making the modification, if you are not sure about this, DON'T DO IT

Use Regedit.exe to change the setting of HTTP protocol:

Step 1: Identity the default browser on the Server (it may be FireFox or any browser installed on the server)
• Find the HKEY_CLASS_ROOT\HTTP\Shell\Open\command and copy it Default value setting by removing "-nohome" option, it should be similar the following line on a 64-bit server:
"C:\Program Files\Internet Explorer\iexplore.exe" or
"C:\Program Files (x86)\Internet Explorer\iexplore.exe"

Step 2: Backup registry key
• Find the HKEY_CLASS_ROOT\HTTP and rename it to HTTP_Bak
• Find the HKEY_CLASS_ROOT\IE.HTTP and rename it to IE.HTTP_Bak

Step 3: Configure http protocol for using with Remote Executer
• Recreate the same registry keys HTTP and IE.HTTP with the shell\open\command
• Edit and change the Default value point to RemoteExecuter.exe with the full path; on an 64-bit Windows server, it will be:
"C:\Program Files (x86)\MQTechnologies\RemoteExecuter\RemoteExecuter.exe" %1

user guide pic1

user guide pic2

Step 4: Specify Default Browser program on the server
• Find the registry key, on 32-bit Windows Server:
[HKEY_LOCAL_MACHINE\SOFTWARE\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http

On a 64-bit Windows Server, the registry key will be at:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http

• Modify the DefaultBrowser key with the value that was copied at the Step 1:
"C:\Program Files\Internet Explorer\iexplore.exe"

Step 5: Configure redirection mode with option using Black List or White List
• Find the registry key (32-bit Windows Server):
[HKEY_LOCAL_MACHINE\SOFTWARE\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http

On a 64-bit Windows Server, the registry key will be at:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http

• Modify the value of RedirectionMode to 0 or 1 or 2:
- 0: redirect all http link without any restriction;
- 1: redirect http link only when the link IS-NOT-IN the BlackList;
- 2: redirect http link only when the link IS-IN the WhiteList.

user guide pic1

Step 6: adding links into Black List or White List
• Depending on the setting of RedirectionMode, you need to fill in the BlackList or WhiteList.

On a 32-bit Windows Server the BlackList (and WhiteList) are located in registry at:
[HKEY_LOCAL_MACHINE\SOFTWARE\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http\BlackList] "url1"="http://www.microsoft.com/"
"url2"="http://www.yahoo.com/"

On a 64-bit Windows Server the BlackList (and WhiteList) are located in registry at:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MQTechnologies\RemoteExecuter\UrlRedirection\Protocol\http\BlackList] "url1"="http://www.microsoft.com/"
"url2"="http://www.yahoo.com/"

You can add link to the black list as many as you want, each with a new key following the format:
url1=http://www.url1.com
url2=http://www.url2.com
url3=http://www.url3.com

When the RediectionMode=0 (Redirect All links), with this setup, when user clicks on an Internet http link in an Outlook email, the execution will be forwarded to Remote Executer, the program itself will verify:

1. If it isn’t under a Remote Session, the link will be opened by the browser on the server, with the Default Browser specified at Step 4.

2. If it is under a Remote Session, the link will be opened in the browser on the client machine.

When the RediectionMode=1 (Redirect with BlackList), with this setup, when user clicks on an Internet http link in an Outlook email, the execution will be forwarded to Remote Executer, the program itself will verify:

1. If it isn’t under a Remote Session, the link will be opened by the browser on the server, with the DefaultBrowser specified at Step 4.

2. If it is under a Remote Session, Remote Executer will verify if the link IS-NOT-IN the Black List the link will be then opened in the browser on the client machine. If the link IS-IN the Black List, the link will be opened on the server with the DefaultBrowser specified at Step 4.

To block all pages of a web site, add the asterisk * character at the end.
Ex: url1=http://www.google.com/* will block all pages and folders of http://www.google.com. Note that http://www.google.com/* is different with http://google.com/*
To block all sub-domains and pages of a website, use the * for the sub-domains. Ex: http://*.google.com* will block everything of google.com.

When the RediectionMode=2 (Redirect with WhiteList), with this setup, when user clicks on an Internet http link in an Outlook email, the execution will be forwarded to Remote Executer, the program itself will verify:

1. If it isn’t under a Remote Session, the link will be opened by the browser on the server, with the DefaultBrowser specified at Step 4.

2. If it is under a Remote Session, Remote Executer will verify if the link IS-IN the White List, the link will be then opened in the browser on the client machine. If the link IS-NOT-IN the White List, the link will be opened on the server with the DefaultBrowser specified at Step 4.

Repeat all the same settings for other protocols like: https, ftp, ftps protocols if you want.


IMPORTANT NOTES:

1. When adding url into the Black or White List, add the prefix protocol (i.e: http://, https://, ftp://, etc) because they are different and from Outlook a link without protocol, ex: www.microsoft.com will be converted by Outlook to http://www.microsoft.com/ before being sent to the Shell command.

2. On the server side, with Windows 2008 R2 (and Windows 2012/R2), if user has made a choice for the Default Browser (FireFox or IExplorer), a registry key: "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\UserChoice" will be created.

In that case, the HKEY_CLASSES_ROOT\HTTP\Shell\Open\command key will be then ignored and HKEY_CLASSES_ROOT\IE.HTTP\Shell\Open\command will be used by Windows prior to the standard HTTP key.

CONFIGURATION URL REDIRECTION FOR MS WORD, EXCEL:
Follow this KB:
http://support.microsoft.com/kb/218153

Add the registry key ForceShellExecute=1 to this location:

If you are running 32-bit Office on 64-bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\9.0\Common\Internet
ForceShellExecute=1

If you are running 64-bit Office on 64-bit Windows, the registry key will be:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\Common\Internet
ForceShellExecute=1

user guide pic1

Remember it’s always under \9.0\ either with Office 2007 or 2010



SCRIPTING/PROGRAMMING WITH REMOTE EXECUTER:

In this new version 5.0, Remote Executer was rewritten as an Active X Exe COM. It can be used from a command line or it can be used with any programming language that can use COM as VBScript, Visual Basic, C++, C#.

For example, with a VBS file, it can be used to run a program on local machine:

'Create Remote Executer COM object:
Dim oRemExec As Object
Set oRemExec = CreateObject("RemoteExecuter.RemoteExec")

' Run Notepad on client machine
oRemExec.Exec "Notepad.exe"

'Open C:\My Documents\MyTextFile.txt with notepad on the client machine
oRemExec.Exec "Notepad.exe", "C:\My Documents\MyTextFile.txt"

'Open C:\My Documents\MyTextFile.txt with notepad on the client machine, and with 'Maximized (3) mode (1: Normal Window; 2: Minimized, 3: Maximized window)
oRemExec.Exec "Notepad.exe", "C:\My Documents\MyTextFile.txt", 3

RemoteExecuter.RemoteExec COM object provides 3 methods:

1. CheckConnection: return True if the connection (communication) can be established from Terminal Server to local (client) machine. Usually, this method is used to detect if Remote Executer has been installed on the client machine or not.
2. IsRemoteSession: return True if it’s running under a Remote Session (Terminal Server or Citrix)
3. Exec(sCmd, sParameter, iShowStyle): return a value greater than 32 means the function call is successful. sParameter and iShowStyle are optional. iShowStyle can be 1-Normal, 2-Minimized or 3-Maximized

 


RELEASE NOTES:

  • 2017-04-11:
    • For Citrix version: add XenDesktop support
  • 2016-03-16 - v5.8.6:
    • Program was slightly redesigned to reduce unnecessary traffic from client to server to avoid unstable connection problem with Windows 2012/R2
  • 2016-02-29 - v5.8.3:
    • Add print command to allow printing a document on default printer installed on local machine
  • 2014-12-20 - v5.7:
    • Rewrite the main component with C++ to fix problem with Windows Server 2012. Please test it thoroughly if you are using Windows 2012/R2.
  • 2014-09-11 - v5.2:
    • Some problem found with Windows Server 2012. Please test it thoroughly if you are using Windows 2012/R2. Windows 2008 is more stable.
  • 2014-07-03 - v5.0:
    • New version 5.0: RemoteExecuter now is rewritten as an Active X COM Exe. It can be used on a command line as previous versions or it can be used with scripting (VBS, PowerShell) or with other programming languages like VB6, C++, C# . RemoteExecuter now provides method for verifying la communication with client side and it can returns error code when executing a program on local machine. Download the document for more detail.
  • 2013-06-06 - v4.8:
    • Modification for working with Windows Server 2012.
  • 2012-07-14 - v4.6:
    • Modification for accepting double quote character in the argument part of the command line.
DOWNLOAD

MQ Technologies
Specialized in Citrix/RDS Virtual Channel Solution
Montreal, Quebec
CANADA
linkedin

© 2006-2017 MQ Technologies