Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a local file from server

Status
Not open for further replies.

jolan7

Programmer
Nov 28, 2005
1
0
0
FR
Hi,
I'm looking for a solution to let a client open a file on his machine (C:\test.html) from a webpage located on our company's intranet.
We run into security issues, does someone know how to do that with an activex component (we can install anything on the user's machine, i.e. a dll) ?
...or any other solution ?

TIA,
Julien
 
{Sorry for my English}
So, you can create such thing. Create Application that way: File->New->Other->Activex->ActiveForm.
Then save all where you want to. Set Project->Web Deployment options and then make Project->Web Deploy. You'll get an empty form. Put there a button and next code to OnClick event of this button:
ShellExecute(handle, 'open', pchar('c:\temp.html'), nil, nil, SW_SHOWNORMAL);(tested in Delphi 6)
Then compile. Open your html file generated in Web Deploy in Internet Explorer and shut down security blocking if enabled,
In fact, you'll have simple delphi compiled application in ocx-module which can be resized at your will to size of a button. Include it to any html file with tag <OBJECT> and don't forget about CLSID.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top