Access to Local Drive

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
devinst
Profound User
Posts: 80
Joined: Mon Apr 20, 2009 11:26 am
First Name: Devin
Last Name: St. Germain
Company Name: Dupre Logistics, LLC
Phone: 337.314.2259
Address 1: 201 Energy Pkwy. Ste. 500
City: Lafayette
State / Province: Louisiana
Zip / Postal Code: 70508
Country: United States
Contact:

Access to Local Drive

Post by devinst »

I would like to have a button on a Profound UI page used in Atrium that would launch a program that is on the local hard drive. Since I do have control of the computers that will be used I can be sure the program will exist and where it will be located.
As a second part, the program that runs will create an XML file to a sub directory on the local driver. I would like to have a second secpmd button that will launch a procecure that would take that XML file created and move it to the IFS on the iSeries.
Any suggestions on how to accomplish either or both of these task?
Thanks.!!!!
Scott Klement
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: Access to Local Drive

Post by Scott Klement »

When you say the "local hard drive", I assume you mean on the Windows PC. This is a bit of a problem, as web browers are not allowed to access the hard drive of the PC -- if they were, any web site you go to, anywhere on the Internet, would be able to read files off of your personal hard drive. I think you can see why that would be a huge security problem.

Having said that... Profound UI does include a "signed Java applet", that can run commands on the local hard drive. This works by providing a cryptographic signature with the applet that, if the user decides to allow it, will allow that Java applet to run commands on the PC.

So you can't really "access the local drive"... you can't read or write files on the user's drive, but you can launch a windows program or document in a Windows program. I think that's what you're looking for, yes? For more information, take a look here:
http://www.profoundlogic.com/docs/displ ... ration+API

and also on one if it's child pages, here:
http://www.profoundlogic.com/docs/displ ... ommand+%29

This JavaScript API will, in turn, call the Java applet, and the Java applet will run the command on the PC. You can put the call to the runPCCommand() API in the 'onclick' of a button on your screen, for example.

The other approach you could take is to access the files using your RPG program. The RPG program can use the IFS interface to access the disks of any computer on the network that has it's drives (or portions of them) shared.

As for creating a file on the PC's hard drive and then transferring it to the IFS... We have a file upload widget that could be used to upload data to the IFS from your PC. But, we do not have a way to create files on the PC's hard drive (aside from accessing the PC hard drive from your RPG program over the network.) If the goal is to have them in the IFS, why not create them there to begin with? This would be much, much simpler!
devinst
Profound User
Posts: 80
Joined: Mon Apr 20, 2009 11:26 am
First Name: Devin
Last Name: St. Germain
Company Name: Dupre Logistics, LLC
Phone: 337.314.2259
Address 1: 201 Energy Pkwy. Ste. 500
City: Lafayette
State / Province: Louisiana
Zip / Postal Code: 70508
Country: United States
Contact:

Re: Access to Local Drive

Post by devinst »

Thanks for all the great info Scott.!!!

I think the Java applet will be the way to go to launch the PC program. The PC program that will run allows users to enter information and then create the XML file in a sub directory. Unfortunatly, I don't see where I will be able to control where that file gets created. I agree, it would be much easier if I could just have it created on the IFS.

I will give these a try and post my results.

Thanks Again.!!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests