Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Aug 2004
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Starting an exe on client side

    Is there a way an exe program will start at user p.c (say at c:\mydrv\myexe.exe) when user selects a button on the browser ?
    Any help appreciated.
    Best regards.
    Mehmet

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what are you wanting to do? are you trying to execute a program on a user's Pc when they click a link on your website?

    *sounds dodgy*

  • #3
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh ... one more thing ....

    you've posted this in the wrong forum.

    this forum is for completed scripts to share with other JS coders, not for asking mundane questions like yours.

    you shoulda posted it into the Javascript programming forum.

  • #4
    New Coder
    Join Date
    Aug 2004
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    No, user will start an exe program (on a specific location ) on his computer when he hits a button on the browser.
    Mehmet

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #6
    Regular Coder
    Join Date
    Jan 2004
    Posts
    185
    Thanks
    2
    Thanked 1 Time in 1 Post
    Code:
    <script language="vbscript" type="text/vbscript">
    Sub Run(Name)
      Set objShell = CreateObject("WScript.Shell")
      objShell.Run Name
      On Error Resume Next
      Set objShell = Nothing  
    End Sub
    </script>
    //...
    <a href="javascript:Run('file://c:/windows/notepad.exe');">notepad</a>
    google to msdn AND hta to lose the warning
    Last edited by subhailc; 08-12-2004 at 12:45 PM. Reason: close a tag

  • #7
    New Coder
    Join Date
    Aug 2004
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
    Mehmet

  • #8
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mehmet_engur
    I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
    Mehmet
    it will only work in Internet Explorer (that's one of the main reasons I never use it), you also need to have the horrible thing called ActiveX enabled (Tools -> Internet Options -> Advanced) and enable all those ActiveX settings.

  • #9
    Regular Coder
    Join Date
    Jan 2004
    Posts
    185
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by mehmet_engur
    I have copied the script into my html code blocks, but it did not run. I have never used "vbscript" before. Is there anything else I have to add into code html block in order to run "vbscript" ?
    Mehmet
    if you're using a wysiwyg editor it won't work, and yes it only works in IE. do this:

    1. open notepad.
    2. copy this code block
    Code:
    <html>
    <head>
    <script language="vbscript" type="text/vbscript">
    Sub Run(Name)
      Set objShell = CreateObject("WScript.Shell")
      objShell.Run Name
      On Error Resume Next
      Set objShell = Nothing  
    End Sub
    </script>
    </head>
    <body>
    <a href="javascript:Run('file://c:/windows/notepad.exe');">notepad</a>
    </body>
    </html>
    3. paste the code into the blank notepad doc
    4. save the file as "anythingyouwant.html". remember to change the option beneath the "save as" dialogue from "text" to "all files".
    5. when adding other executables, just copy the line between <a and /a> and make sure you keep the syntax intact. if you copy the location from windows explorer you'll have backslashes instead of slashes, which won't work.

    isn't it funny how all the good browsers dont support all the useful, simple features that ie does. i guess they make up for it by having improved security, otherwise all the hackers would break into my computer and take all the highly valuable information.

  • #10
    New Coder
    Join Date
    Aug 2004
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I managed it to run the EXE program on client side. But it is not loading from frame set, it only loads from standalone web page. Why is it so ? It gives error message when I try to load it from frame.
    Also is there a way I can search user drivers and find the address of myexe.exe program so that I can lload the program from that address ?
    Thanks for everybody help for this problem.
    Mehmet

  • #11
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by subhailc
    isn't it funny how all the good browsers dont support all the useful, simple features that ie does. i guess they make up for it by having improved security, otherwise all the hackers would break into my computer and take all the highly valuable information.
    isn't it funny how once yet another IE vulnerability is discovered, one simple webpage could wipe out your hard drive?

  • #12
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mehmet_engur
    I managed it to run the EXE program on client side. But it is not loading from frame set, it only loads from standalone web page. Why is it so ? It gives error message when I try to load it from frame.
    it cannot be embedded to a webpage, try to live with that. You are already using IE specific code that will only run for those few people who have ActiveX enabled, and who are brave, or stupid enough to let a webpage run an application. Sigh. I hope your entire webpage doesn't rely on the application, but just that it's an extra feature like a calculator or something. Otherwise, it would be an extremely inaccessible way, and if you're doing the website for a company, it could be sued.

    Quote Originally Posted by mehmet_engur
    Also is there a way I can search user drivers and find the address of myexe.exe program so that I can lload the program from that address ?
    well, once the user has enabled ActiveX for the page, it can do pretty much anything. get directory listings, read files, create files, write to file, append files, delete files, rename files, copy files, rename directories, delete directories, read the registry, modify the registry, run any program... fun isn't it???? why can't microsoft just concentrate on basic web standards instead of this dreadful and useless technology which hazards every IE user's security? read more about this technology yourself or hope that someone else gives you the code, I won't.

  • #13
    New Coder
    Join Date
    Aug 2004
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks For everybody help for this problem.
    Just to give information I will not use this project on the internet but it will be used intranet. I think this way we will be a little bit on the safe side. On the other hand since vbscript can not be activated inside the frame, we will not be able to use it in our project at all.
    I would like to thank everybody that Warning me on security side of the using activex components.
    Best regards.
    Mehmet


  •  

    Posting Permissions

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