pui.runPCCommand question
-
- Profound User
- Posts: 20
- Joined: Fri Sep 08, 2017 8:14 am
- First Name: Michael
- Last Name: Corbo
- Company Name: National Retail Systems
- Phone: 2018042713
- Address 1: 600 us rt 46w
- City: Hasbrouck Heights
- State / Province: New Jersey
- Zip / Postal Code: 07601
- Country: United States
- Contact:
pui.runPCCommand question
Is it possible, prior to running pui.runPCCommand to determine if the PC Command listener is running on the PC? I would like to notify the user that they need to have it installed and/or running if they want to access a certain function where I open an Excel file from the IFS.
- Megan
- Profound Logic Staff Member
- Posts: 90
- Joined: Mon Sep 11, 2017 12:15 pm
- First Name: Megan
- Last Name: Bond
- Company Name: Profound Logic
- Phone: 5623227473
- State / Province: California
- Zip / Postal Code: 92692
- Country: United States
- Contact:
Re: pui.runPCCommand question
Hello Michael,
This is currently not possible. Normally, a try/catch could be used here, but, since our code already catches the error, this will not work. If you would like to submit a feature request for this functionality, please email us at support@profoundlogic.com so that we may create one for you.
Thanks,
This is currently not possible. Normally, a try/catch could be used here, but, since our code already catches the error, this will not work. If you would like to submit a feature request for this functionality, please email us at support@profoundlogic.com so that we may create one for you.
Thanks,
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: pui.runPCCommand question
There is no actual way to check if the listener is installed, only if an error has occurred. This is because code running in the browser is not allowed to interact directly with the PC operating system (it would be a huge security problem if it could). You'd need an actual program running on the PC to check that (and then you'd need a way to check if *it* was installed... chicken and egg scenario)
try/catch does not make sense, here... this makes an AJAX call, which runs asynchronously in the background. (The error would not occur as your call to pui.runPCCommand is happening.)
What could be done if you wanted to place a feature request would be to have a callback routine that runs when the command has completed that would indicate success or failure. This would be a departure from the current design, however, since it is meant to be like the STRPCCMD CL command, which has no way to detect success/fail. If it failed, you could "assume" (perhaps incorrectly) that this was because the PC Command listener isn't installed, you could phrase it something like "Command Failed -- make sure you have the listener installed" or something like that.
To place a feature request, contact support@Profoundlogic.com
try/catch does not make sense, here... this makes an AJAX call, which runs asynchronously in the background. (The error would not occur as your call to pui.runPCCommand is happening.)
What could be done if you wanted to place a feature request would be to have a callback routine that runs when the command has completed that would indicate success or failure. This would be a departure from the current design, however, since it is meant to be like the STRPCCMD CL command, which has no way to detect success/fail. If it failed, you could "assume" (perhaps incorrectly) that this was because the PC Command listener isn't installed, you could phrase it something like "Command Failed -- make sure you have the listener installed" or something like that.
To place a feature request, contact support@Profoundlogic.com
Who is online
Users browsing this forum: No registered users and 5 guests