Cr07&Lm10
14th September 2015, 18:07
Hello,

I am getting the attached during executing the function start.application.local through WebUI. As per "progguide", WebUI supports start.application.local. It is working fine through Bw/Worktop. Kindly help. It is ERPLN FP9.

Thanks in advance.

bhushanchanda
14th September 2015, 18:52
Hi,

This is HTML UI. The following functions are not supported when the client runs in HTMLUI mode:

client2server()
server2client()
create.local.file()
create.local.directory()
dir.select.dialog.local()
get.client.directory()
get.client.hostname()
get.local.filename()
remove.local.directory()
remove.local.file()
seq.fstat.local()
seq.open.dialog.local()
seq.open.dialog.next()
seq.saveas.dialog.local()
start.application.local()


The following functions have to be used when the client runs in HTMLUI mode:

client.upload.file - combines client2server with 'dialog' functions
client.download.file - combines server2client with 'dialog' functions
client.show.file
client.prepare.download
client.add.download.file
client.start.download
client.upload.files
client.get.upload.filecount()
client.get.upload.file
client.delete.upload.file.object

Check the latest prog guide for details about each. Also refer this (http://www.baanboard.com/baanboard/archive/index.php/t-67004.html)

Gaurav Gupta
15th September 2015, 08:38
HI Bhushan,

In all of these functions of WEB UI, there is no function that can replace start.application.local().

Do you have any idea by which function of LN UI we can replace start.application.local().

Actually i am facing a problem to execute a .exe file at client machine.

Please suggest thanks,,

bhushanchanda
15th September 2015, 09:32
Hi,

Basically, start.application.local() can be considered as a hazardous function and can have security risks involved (Yes, the developer can be easily caught) But say if some programmer writes this -

start.application.local("cmd /c format c",true,ret,"") :)

HTML5 doesn't allow to execute programs on client machine without the users permissions. So, there is no direct way of doing this.

But, alternative ways are to use some open source tools like - PsExec (https://technet.microsoft.com/en-in/sysinternals/bb897553.aspx)(For windows based servers) and similar applications on Linux based servers where you can pass the client machine's IP to pass a file and execute it.

Without a tool like that, I don't think there is a way.

You can use standard tools function to transfer the file and ask the user to execute it manually.

shashig
15th September 2015, 12:32
We created a small dotnet based utility which runs as a background process and keeps looking of task entries in our Task table.

We modified our programs to create a entry in a the above task table storing the location and path of file to be executed and user details. The utility program does a check on this table for new entries every 10 seconds, executes the task for the user and deletes the task.

In Our case we implemented above to trigger Barcode printing and Crystals Reports.

There is no way as far as i know, by which you can execute applications directly from client browser without user permissions.

Regards,
Shashikant

Gaurav Gupta
17th September 2015, 10:40
HI Bushan,

Thanks for the Reply, can you please explain me how we can use PSEXEC with ERP LN.

Thanks

Gaurav Gupta

bhushanchanda
17th September 2015, 12:36
Hi,

Offcourse its a way, but not a straightforward way and involves some architecture-making. Plus, you need to have networking guys working along. If the client PC is in local network, its easier. You can simply install Psexec tools to your server and use the psexec commands using run.prog(). You have an LN function get.client.ip.address() and get.client.hostname() to get the IP address and host name which you can use with psexec command.

Here (http://ss64.com/nt/psexec.html) are some samples of the commands.

Note - You might need a lot of troubleshooting and researching for making the architecture work.

JaapJD
17th September 2015, 15:08
You have an LN function get.client.ip.address() and get.client.hostname() to get the IP address and host name ...

get.client.hostname() is in the list of functions that are not supported in HTML UI!

bhushanchanda
17th September 2015, 15:11
get.client.hostname() is in the list of functions that are not supported in HTML UI!

Well, that will make the implementation of an alternative even more difficult. :) In that case, a listener at the client side might be a necessity.

Thanks Jaap for the update.

OmeLuuk
14th June 2019, 01:02
--8<-- you as a moderator may choose differently -->8-- :rolleyes:

Well, I also will run into the need for a shift from run.application.local towards preparing a download list of mime type known on the client.

Our deliveries need a (variable) set of load/shipment/order related bundle of legally mandatory hard copies.

It will cost the company (we will be fined) when all or some papers are missing :(

So we will have a need to print a bunch of server-side residing PDF's in a given sequence. As they are PDF's it is relatively simple... if you can teach the webUI to handle PDF in a way to print them silently. Can you?

With the client.add.download.file you can add a mime.type (ao) but can you teach all clients somehow to download and silently print the PDF instead of putting them somewhere in a download folder and show them in a browser?

As Adobe has removed the "silent print option" from their product line, it seems that teaching a mime handler to do just that will become an issue.

Downside is that AVG sensitive files will be dumped on the client, without further maintenance scheme.

As an alternative we can download an instruction file in which the (client accessible) PDF's are listed including the network printer to use and the AD-account which will be used (linked to the active user). This will then become a new mime.type "print.instruction.file" which will be linked to a local triggered .net application. That application can then run with local credentials and print the files from the network location (provided the PDF print application does not need a local file)...

On the printer an application is running to separate printouts based on the currently logged on user. Thus we can be sure user takes only his own delivery papers.

The alternative route will be server side printing, but in that case it is not possible to use the (local known and used) AD credentials to do that: we then need to use the same .net program running as a service to also switch user context to known credentials used for printing only... And we do not want to know and use all secret credentials from the users.

What would be your solution / advice?