Using INVOKE with Windx on remote RDP users

Started by MikeinFL, January 20, 2022, 11:12:38 AM

Previous topic - Next topic

MikeinFL

I'm new to setting up windx on remote RDP and need help.  I'm testing demo PXPlus Base on a 'cloud' Windows Server 2019 with our users logging in via remote RDP.  I also installed Windx on the Windows Server 2019 to use with *nthost.

Each user has their own presented RDP desktop.  On the first user's RDP desktop I created a Windx shortcut to run our start up program and it runs ok.  The INVOKE in *nthost brings up a windx screen on this user's rdp desktop like I want, and runs our code ok.  Except when our program executes INVOKE to open a freeware notepad- the notepad appears on the server desktop, not the user's RDP desktop where I want it to appear.

Usually I'm setting up nthost or cs on local PC's on a LAN.  What am I doing wrong or need to change with the RDP desktops?  The way our code works is that it will open the freeware notepad by pc name location, so that notepad, installed on each LAN PC, appears on the windx PC that invoked it.  Our code:

IF NID=%LPC_COMPUTERNAME$ THEN INVOKE QUO+LSERVER$+QUO+" "+QUO+F$+QUO
IF NID<>%LPC_COMPUTERNAME$ THEN INVOKE "[WDX]"+quo+LCLIENT$+QUO+" "+quo+F$(6)+QUO

This is not working for rdp desktop.  I can also just use notepad.exe and not the freeware.  How to have the code recognize the rdp user and invoke on that user's desktop?  Thanks.

Mike Flemmer
BASIC PC SOLUTIONS

Stéphane Devouard

Mike

Many moons ago, I was using env("clientname") to identify workstations in Citrix/TSE environments
You may want to try it and see if that works for you

Regards
Stéphane Devouard
Portfolio | Work

michaelgreer

Mike,

I would be suspicious of how your %LPC_COMPUTERNAME$ is being set. Assuming that you *always* want the notepad or freeware on the client PC you can detect wdx with this code: IF MID(MSE,22,1)>$00$ AND MID(MSE,22,1)<$FF$.  If this is not $00$ or $ff$ then you are on windx.  You could also test by connect from RDP and just issue your invoke with no conditional and see where the notepad launches.

Michael

MikeinFL

Thanks for the replies.  I will try those suggestions when I can.  Right now I have limited time to work on it as they have to use our software during the day. 

This is the only customer I believe that is running remote desktop in desktop mode, and INVOKE works ok in our current software in ProvdeX 5.0.  Just not in demo PxPlus.  However I have another customer running PxPlus using RDP in program app mode, and INVOKE works ok using RDP that way.

I haven't tested RDP in program app mode yet because the tech didn't know how to set it up for me.  I might have it today.

Mike King

Have you tried the following:

INVOKE "[lcl]XXXXXXX.exe"
(where XXXXXX is the name of the Executable you want to run)

Basically with PxPlus you can prefix the INVOKE command string with "[lcl]" and if the system is running WindX the command will be routed to the WindX to run. 

Now you have to make sure the program have been installed on the workstation (or in your case the workstation RDP environment) and that you have the correct pathname / PATHing rules.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

MikeinFL

They finally setup my RDP and I was able to test what's happening.  I don't know if I need to create a ticket, but I can work around the issue.

I'm using INVOKE to run freeware notepad prolix.exe and it's located in a directory path that has no spaces, which runs ok in both ProvideX and PxPlus.  Somehow an older version of my prolix device was running it from PxPlus working directly, which does have spaces in it's directory path:

C:\PVX Plus Technologies\PxPlus 2019 Upd 2\locals\prolix\prolix.exe

In testing I found that if an INVOKE directory path has spaces ProvideX 5 runs ok, but not PxPlus.   This line of code runs ok in ProvideX 5.0 but in PxPlus "cannot find" pops up. See attached snaps:

0020 INVOKE "[WDX]C:\BASIC PC SOLUTIONS\COMMON\Prolix\PROLIX.EXE"

The spaces are ok in Providex, but not in PxPlus?

The user had no problem because they are currently on ProvideX and I'm testing demo PxPlus and found prolix would not appear on their windx run desktop.  I can rewrite my prolix device code to point to a no-space directory path and PxPlus will run ok in [WDX], and appears on their desktop correctly.   At this point I think I'm ok.  Thanks.

Mike King

As per Windows standards, put quotes around the EXE pathname as in


0020 INVOKE "[WDX]"+quo+"C:\BASIC PC SOLUTIONS\COMMON\Prolix\PROLIX.EXE"+quo
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

MikeinFL

Mike, that's solves it, thanks! 

Also, I'm aware Providex is not supported and upgrading to PxPlus requires some code changes.  But it's worth it.  PxPlus is amazing. With many new features and capabilities.

I have an 18 user PxPlus user with many of them logging into remote desktop.  Initial setup log-in issues they had were caused by their cloud server, not PxPlus.  After they upgraded the server it's been running very smooth.