Written by

Sr Sales Engineer (Public Sector) at InterSystems Corporation
Question Chip Gore · Sep 20, 2022

Launching an application from a CSP Page

Hi -

I'm looking for some help in getting an OS level application on my server to startup from a csp page and I'm just missing something.

I have a routine (and I've tried the same code from an instance method, with the same results) that will launch an application at the OS level using the $zf(-100,keywords,program,parms) from a terminal session, but it won't/doesn't seem to work when I call the code from a #server() call from my webpage. I don't know if there is some combination of keywords or perhaps a different version of the $zf() call that should/would work.

I am open to any suggestions at this point.

Product version: IRIS 2021.1
$ZV: IRIS for Windows (x86-64) 2021.1 (Build 215U) Wed Jun 9 2021 09:39:22 EDT

Comments

Warlin Garcia · Sep 20, 2022

Have you tried "jobbing" the routine from the CSP?

0
Chip Gore  Sep 20, 2022 to Warlin Garcia

Jobbing had no effect. :(

0
Ben Spead · Sep 20, 2022

Does your CSP application have sufficient Call-out Privs?  Check the audit log to see if there are any security failures from the #server() call

0
Chip Gore  Sep 20, 2022 to Ben Spead

The #server() call seems to be doing what I expect, it returns a value that I "alert();" and I'm getting that value back, so it's not crashing in there and I'm not seeing anything in any logs :-/

0
Ben Spead  Sep 20, 2022 to Chip Gore

@Chip Gore  - if it is returning the value and you get it back, then I don't understand what you mean by "it won't/doesn't seem to work when I call the code from a #server() call from my webpage."  What isn't happening resulting in your classification of "not working"?

0
Edward Clark · Oct 12, 2022

This is on windows? The windows terminal runs as the desktop user, but the csp page is running as the IRIS superserver which doesn't have access to your windows desktop. If you look in Task Manager you will probably see an entry for your running OS application. You just can't directly interact with it. Windows XP used to show you a popup that would open the alternate desktop, but newer windows versions don't do that anymore.

0
Marc Mundt · Oct 12, 2022

Are you just calling out to a command-line utility -- like calling PGP to decrypt a file? Or are you trying to launch a GUI application that the user will interact with?

0