www.webdeveloper.com
Results 1 to 15 of 15

Thread: Opening a program

  1. #1
    Join Date
    Dec 2002
    Posts
    131

    Question Opening a program

    Hi There

    I was wondering if anyone know how to open a progaram, from a web page link..

    This web page i'm speaking of is just for me to run on my local machine, i'm using Apache, and im trying to make a web page for my little sister so when she starts up her IE she can go to one of her games or she can search the Internet.. There is a very long story why to do this but i think this can be great for her just not sure how to do that..

    Because if i put
    PHP Code:
    <a href="c:/program files/game/game.exe">Games</a
    It wants me to download right away how can i avoide this and just open it and run it.

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Like as in, run a virus?

  3. #3
    Join Date
    Dec 2002
    Posts
    131
    No not a virus i dont know anything about that, it's a game something like magic school bus.

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    My point was, if you could run an .exe file (even for a game) a script kiddie could run a virus.

  5. #5
    Join Date
    Dec 2002
    Posts
    131
    OH OK Yes sorry, still learning here

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    np.

  7. #7
    Join Date
    Dec 2002
    Posts
    131
    So what do you think, can this be done? or am over my head hear and it can not be done!

  8. #8
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    No, you can't run an .exe without promting your users. Best bet it probably to just have them save the file and run it from their own computer.

  9. #9
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833

    Re: Opening a program

    Originally posted by Redhead
    Hi There

    I was wondering if anyone know how to open a progaram, from a web page link..

    This web page i'm speaking of is just for me to run on my local machine, i'm using Apache, and im trying to make a web page for my little sister so when she starts up her IE she can go to one of her games or she can search the Internet.. There is a very long story why to do this but i think this can be great for her just not sure how to do that..

    Because if i put
    PHP Code:
    <a href="c:/program files/game/game.exe">Games</a
    It wants me to download right away how can i avoide this and just open it and run it.
    You said this page runs locally, right? If you did, read on, if not, ignore the post.
    Like pyro said, it's not gonna happen with it prompting for download. When it prompts for download, don't click save, click 'open'. That should run it from it's current location.

  10. #10
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Actually, if it's local, and you play around with the security settings for the My Computer security zone you can eliminate the download message (on IE at least) and the security warning for the ActiveX component by using:

    PHP Code:
    function run(file) { 
        var 
    ws = new ActiveXObject("WScript.Shell"); 
        try{     
            
    ws.run(file); 
        } catch (
    Exception){
            
    alert ("file not found");
        }
    }
    ....
    <
    a href=# onclick="run('c:/program files/game/game.exe')" >Games</a> 

  11. #11
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833
    Ummm.....What ^ He ^ Said, lol.

  12. #12
    Join Date
    Dec 2002
    Posts
    131
    Ok that sounds good i'll try that in a bit after dinner and ill let everyone know how i made out ok.

    Thanks So Very Much

  13. #13
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104

    Re: Opening a program

    Originally posted by Redhead
    just for me to run on my local machine
    Why do I always miss these parts?

  14. #14
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004

    Re: Re: Opening a program

    Originally posted by pyro
    Why do I always miss these parts?
    You may be a Super Moderator, but you're still human.

  15. #15
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104

    Re: Re: Re: Opening a program

    Originally posted by Paul Jr
    ...but you're still human.
    Yeah, but I'm working on that part...

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