More and more, we began to display our programs in the clouds. Good or bad - we will not argue, but here's a situation when you need to dock local programs with cloud programs, we'll talk a little bit today: in the context of our EDMS Docsvision and any email client installed locally on the user's PC. Imagine the task: open the link to the Docsvision “card”, which was mailed to the user in an email client installed locally on his computer. After examining the issue, analyzing the experience of our partners, we found a solution that we want to share with you.
The main client software in Docsvision is Navigator, which can be published as a Remote App. There may be various reasons for this: for example, a weak channel from a remote unit to the Docsvision server. Cloudy, fast for the user, convenient for the admin. But what happens in the case of the task described above, when you need to open a link to the "card" from an email client installed by the user locally on the computer.
Let's explain a little bit what happens in this default configuration. The user receives an email with a link to the Docsvision object, tries to navigate through it, it opens a locally installed browser and ... this is where the problems begin, because the link does not open because the Docsvision server is not available. The user is indignant and scribbling applications to the IT service. Recently, the question "how to solve this problem?" Increasingly sounded from system administrators.
The essence of our solution is as follows.')
The link to the object in Docsvision is formed in a certain form. When this link is called on the client computer, a script is triggered, which opens RemoteApp and converts it into a standard link to the Docsvision object, which is opened by the browser by default in RemoteApp. Thus, we run Docsvision Navigator on a remote desktop.
Of course, this solution does not claim to be the only correct one, but we are sure that it is working and is used in solutions in which there are more than 4,000 active users.
We will share in the form of step by step instructions.
Step setting1. Create a VBS script with content.
On Error Resume Next Dim WshShell Set WshShell = CreateObject("WScript.Shell") Dim regEx if WScript.Arguments.count >0 then Arg = WScript.Arguments.Item(0) Set regEx = New RegExp regEx.Pattern = "^dv5term://(.*)" regEx.IgnoreCase = True arg = regEx.Replace(arg, "$1") WshShell.Run "http://" & arg end if
2. We publish the script created by VBS as RemoteApp on the server, for example, with the name “docsvision5-link”.
Go to the RemoteApp Manager and select “Add Remote Programs”.

In the opened “RemoteApp Wizard”, following the instructions, we publish the VBS script




3. We give the published application “docsvision5-link” permission to execute all command line commands.

4. Create an RDP file for the docsvision5-link application, in the Remote App Wizard (example RDP file is dv5link.rdp).



5. Distribute the conscious Rdp file to client workstations.
6. On the client computer, create a registry branch dv5term using a file with the .reg extension, which contains entries:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\dv5term] @="URL:dv5term Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\dv5term\shell] @="" [HKEY_CLASSES_ROOT\dv5term\shell\open] @="" [HKEY_CLASSES_ROOT\dv5term\shell\open\command] @="\"mstsc\" /remotecmdline:\"
7. Change the formation of links, which is formed by the server on the card, on the form dv5term: //server.docsvision.com/DocsVision/? CardID = {1007DDE2-76E0-E511-80CA-A0D3C1063571}
What will happen with these settings:
User clicks the link:
dv5term: //serverRDP.docsvision.com/DocsVision/? CardID = {1007DDE2-76E0-E511-80CA-A0D3C1063571}

The following command is executed in the registry:
"mstsc" /remotecmdline:"%1" "\\serverRDP.docsvision.com\DocsVision\dv5link.rdp"
those. \\ serverRDP.docsvision.com \ DocsVision \ dv5link.rdp with passing the parameter to it as a full URL

The script is called with the same parameter:
\\ serverRDP.docsvision.com \ C $ \ script \ ie5.vbs% 1

This script:
On Error Resume Next Dim WshShell Set WshShell = CreateObject("WScript.Shell") Dim regEx if WScript.Arguments.count >0 then Arg = WScript.Arguments.Item(0) Set regEx = New RegExp regEx.Pattern = "^dv5term://(.*)" regEx.IgnoreCase = True arg = regEx.Replace(arg, "$1") WshShell.Run "http://" & arg end if

converts the parameter:
dv5term: //serverRDP.docsvision.com/DocsVision/? CardID = {1007DDE2-76E0-E511-80CA-A0D3C1063571}
at
serverRDP.docsvision.com/DocsVision/?CardID= {1007DDE2-76E0-E511-80CA-A0D3C1063571}
normal replacement and makes the call
Set WshShell = CreateObject("WScript.Shell") WshShell.Run http://serverRDP.docsvision.com/DocsVision/?CardID={1007DDE2-76E0-E511-80CA-A0D3C1063571}
Those. tries to execute the command in the standard way for the system, and if it is more accurate, it will try to open, by default, the browser server terminal link
serverRDP.docsvision.com/DocsVision/?CardID= {1007DDE2-76E0-E511-80CA-A0D3C1063571}
Again, this decision does not claim to be the only correct one. Perhaps you have some other solutions to this problem?
We will be happy if you share!Kirill Khokhlov, Senior Consultant, DoksVision.