Forum / Remote Desktop Manager - PowerShell Repository

Open Sessions With Changed Installation Path

  • Create an Issue
  • Cancel


Hi,

when executing the powershell command "Open-RDMSession" for programs with a different installation path, I always get the prompt that you can see on the screenshot attached.

The session is working from within RDM but when executing the PowerShell command, I always get this prompt (even if the path was selected and the command was executed again).

Do I have any options to change the path permanently for the PowerShell command?


Best Regards

open-rdm-session.png
Clock14 days

Do you mean that the OpenVPN path is selected? I suspect that the Power Shell current directory is different than RDM.

Regards

David Hervieux

signaturesignature

Clock13 days


Hi,

yes our OpenVPN path is "C:\Program Files\OpenVPN" and not "C:\Program Files(x86)\OpenVPN" (default). Within RDM, I changed this path. And the session is working without any issues. But when launching via PowerShell RDM tries to use the default path.

Could you explain what you mean with "the Power Shell current directory is different than RDM"... i tried to change the directory to "C:\Program Files (x86)\Devolutions\Remote Desktop Manager" and execute the Open-RDMSession afterwards, but that did not change anything.


Best Regards

Clock13 days

Hello,

Is RDM installed in C:\Program Files (x86)\Devolutions\Remote Desktop Manager or in another folder?


Best regards,



Jeff Dagenais
signaturesignature

Clock13 days


Hi,


yes, RDM is installed to the "C:\Program Files (x86)\Devolutions\Remote Desktop Manager" folder.


Best regards

Clock10 days

Hello,

Are you executing PowerShell from RDM?

Best regards,



Jeff Dagenais
signaturesignature

Clock9 days


Hi,

no i tried to automated something and therefore I created a script and loaded the PowerShell module.

Best Regards

Clock9 days

Hello,

Thank you for the information.

I've tried to reproduce your issue without success.

What RDM version are you using and what data source type are you connected?

Best regards,



Érica Poirier

signaturesignature

Clock9 days

Hello,

Is it possible that the script is running in a different user context?

Because the alternate installation path value is saved in the RemoteDesktopManager.cfg file located in %localappdata%\Devolutions\RemoteDesktopManager, if you are running the PowerShell script in a different user context, then the OpenVPN alternate installation path will not be found.

A workaround would be to set the working folder before loading the RDM PowerShell module. That could help to temporary resolve your issue.
https://docs.microsoft.com/en-us/powershell/scripting/samples/managing-current-location?view=powershell-7

Best regards,



Érica Poirier

signaturesignature

Clock9 days


Hi,

Data source: MySQL
RDM Version: 2019.2.22.0 Enterprise


thanks for the fast support. I've analyzed the issue further and found out that the problem seems to be something different:

- When launching the session from RDM, the session works without changing the default path when OpenVPN is installed under "C:\Program Files\OpenVPN". Even if NO custom installation path is specificed in the config file.


- When launching the session from PowerShell, RDM tries to load the OpenVPN binary from "C:\Program Files(x86)\OpenVPN". If OpenVPN is installed to "C:\Program Files\OpenVPN", I get a prompt to select the path.

- If I specify the 64 bit path in the config file, I can also open the session via PowerShell without getting the prompt.


<CustomInstallationPath>
<Name>OpenVPN GUI</Name>
<Path>C:\Program Files\OpenVPN\bin</Path>
</CustomInstallationPath>


So from my point of view, it looks like if the 64bit path is a "default path" when launching the session from RDM but not when launching from PowerShell?! Should that be the standard behaviour?


I've attached the PowerShell commands I used to open the session.

Best Regards

RDM-OpenSession-PowerShell.PNG
Clock9 days


Hello,

Thank you for the information. Let me check with the engineering team and I will keep you posted.

Best regards,



Érica Poirier

signaturesignature

Clock6 days

Hello,

Could you please try to launch the session using the Command line in the Advanced tab to see if you will get the same behaviour?
For more information about the Command line, please see this online help page.
https://help.remotedesktopmanager.com/entrytypes_advanced.htm#ids-(used-in-a-command-line-or-in-powershell-scripts)

image

Best regards,



Érica Poirier

signaturesignature

Clock1 day