www.webdeveloper.com
Results 1 to 15 of 15

Thread: how to open a desktop program from a webpage

  1. #1
    Join Date
    Jul 2006
    Posts
    25

    how to open a desktop program from a webpage

    Please advice how to do this.. For example a have a link on my webpage and when I click it it will open "notepad" program..

    If this is not the right category for this please let me know..

    Thanks
    Let me know if you need a Custom Bot

  2. #2
    Join Date
    Mar 2012
    Posts
    1,340
    I suspect such an attempt would probably fail, because the user's firewall would prevent it. A possible alternative would be to link to a cloud app. I'm sure that such things exist, but I do not have specifics. Besides which, why do you need to use an external text editor anyway? HTML forms have an input field for blocks of text.

  3. #3
    Join Date
    Jul 2006
    Posts
    25
    Hi, The "notepad.exe" is just an example. What Im really going to do is launch a software with the /auto argument when the link is clicked.

    How about in javascript. Can it be done?

    Thanks
    Let me know if you need a Custom Bot

  4. #4
    Join Date
    Jun 2012
    Location
    usa
    Posts
    4
    really want to know more about this application and software.... if u have proper information please share it.....

  5. #5
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    588
    I use a link with href
    Code:
    file:///c:/ADirectory/FileName.bat
    to run the "FileName.bat" file. It works in Opera but not in some other browsers. That .bat file can then contain whatever you wish.

  6. #6
    Join Date
    Jun 2012
    Location
    usa
    Posts
    4
    thanx for giving link

  7. #7
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    It's a security thing. which is why links to hard drives don't work from online, but it can be done if you set your own computer up as a server and set the link to it on that server with the correct path.

  8. #8
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    588
    Quote Originally Posted by Major Payne View Post
    It's a security thing. which is why links to hard drives don't work from online, but it can be done if you set your own computer up as a server and set the link to it on that server with the correct path.
    Online links to hard drives work just fine as long as the file you're linking to exists. No server is needed.

  9. #9
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Quote Originally Posted by jalarie View Post
    Online links to hard drives work just fine as long as the file you're linking to exists. No server is needed.
    Sorry, but this is NOT true! You can not access people's computer for a file they have a link to from online even if the link is true for a local directory unless they have set their computer up as a server!!!
    Last edited by Major Payne; 07-04-2012 at 11:47 PM.

  10. #10
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    588
    Quote Originally Posted by Major Payne View Post
    Sorry, but this is NOT true! You can not access people's computer for a file they have a link to from online even if the link is true for a local directory unless they have set their computer up as a server!!!
    As I originally stated, it does NOT work in all browsers. But I DO use it all the time using Opera. It DOES work there.

  11. #11
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    I have about 5 or more different browsers and none, including Opera, will get a file from someone's hard drive using a link online. Not gonna happen. You will get an error as there is no way to just put a link like "file:///C:/Users/UserName/Documents/file_name.html" and expect to go to that computer's hard drive to get it. Not without using a file hosting service, having user download something like an ActiveX control, or using an app like TeamViewer or Windows own remote access/sharing service.

    This is a link to the real file on my hard drive for you to get.

  12. #12
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    588
    Quote Originally Posted by Major Payne View Post
    I have about 5 or more different browsers and none, including Opera, will get a file from someone's hard drive using a link online. Not gonna happen. You will get an error as there is no way to just put a link like "file:///C:/Users/UserName/Documents/file_name.html" and expect to go to that computer's hard drive to get it. Not without using a file hosting service, having user download something like an ActiveX control, or using an app like TeamViewer or Windows own remote access/sharing service.
    The file I reference on my hard drive is a batch file not html. The browser brings up a prompt to "save" or "run" it and I click the "run" button. All activity then is controled by the batch file.

    I'm running a browser on my own machine and it then references files on my own machine. Where the web page is stored is irrelivant. This is similar to downloading an executable file from a server except that the pointer is to a file local to the user running the browser.

    I can NOT get files from YOUR machine while running something on MY machine.

  13. #13
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Quote Originally Posted by jalarie View Post
    I can NOT get files from YOUR machine while running something on MY machine.
    Point made which the OP was asking about! End of discussion for me.

  14. #14
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    588
    Quote Originally Posted by Major Payne View Post
    Point made which the OP was asking about! End of discussion for me.:rolleyes:
    No. The OP asked:

    Quote Originally Posted by mason66 View Post
    I have a link on my webpage and when I click it it will open "notepad" program.
    Notice that it is the OP's webpage (pulled from a server) and the OP who is clicking on it. Therefore, he is on his OWN machine. He has FULL ACCESS to his own machine. I do this every day.

    I do agree with you on one thing though: It is a worthless discussion between a person who does something and a person who refuses to believe it.

  15. #15
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Quote Originally Posted by jalarie View Post
    I do agree with you on one thing though: It is a worthless discussion between a person who does something and a person who refuses to believe it.
    OP Asked "how to open a desktop program from a webpage". Don't know what your little snide remark has to do with anything here as it has been asked and answered. Browser's will only run a program on your own computer from an online link if it has a program associated with the file extension to open the program. Otherwise, you get a popup box asking to select the program required to open/run the link. Example: blah.pdf will open Adobe Reader or similar program if installed on the user's computer and the browser has a program associated with the *.pdf extension. Otherwise, nothing is run and you must either install a PDF reader or find the path to the PDF reader installed for the browser to use.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles