Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. javascript execute function

javascript execute function

Scheduled Pinned Locked Moved ASP.NET
javascripthelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmed Galal
    wrote on last edited by
    #1

    is there a way to make javascript executes an exe file on the client machine. its not a hack program, but i just want to laucnch a specified file on the client machine, the file already exists on the client so i don't have to send it first, i just want to execute the file. any help ?

    J 1 Reply Last reply
    0
    • A Ahmed Galal

      is there a way to make javascript executes an exe file on the client machine. its not a hack program, but i just want to laucnch a specified file on the client machine, the file already exists on the client so i don't have to send it first, i just want to execute the file. any help ?

      J Offline
      J Offline
      Jesse Squire
      wrote on last edited by
      #2

      There is not a direct way for you to execute a file on the client machine through javascript. If there was, it would be a security hole of epic proportions. Consider what would happen if any site you visit could run an arbitrary executable on your machine. Scary. :~ That being said, if you are working in a trusted environment, your best bet would probably be to code an ActiveX control to perform the execution. This can be done by calling a function such as the Win32 ShellExecuteEx function from your ActiveX control. A hosted Java applet or .NET custom control (of the WinForm variety) may also be able to accomplish the task if you can elevate their permissions. Hope that helps. :) --Jesse

      A 2 Replies Last reply
      0
      • J Jesse Squire

        There is not a direct way for you to execute a file on the client machine through javascript. If there was, it would be a security hole of epic proportions. Consider what would happen if any site you visit could run an arbitrary executable on your machine. Scary. :~ That being said, if you are working in a trusted environment, your best bet would probably be to code an ActiveX control to perform the execution. This can be done by calling a function such as the Win32 ShellExecuteEx function from your ActiveX control. A hosted Java applet or .NET custom control (of the WinForm variety) may also be able to accomplish the task if you can elevate their permissions. Hope that helps. :) --Jesse

        A Offline
        A Offline
        Ahmed Galal
        wrote on last edited by
        #3

        thanks :)

        1 Reply Last reply
        0
        • J Jesse Squire

          There is not a direct way for you to execute a file on the client machine through javascript. If there was, it would be a security hole of epic proportions. Consider what would happen if any site you visit could run an arbitrary executable on your machine. Scary. :~ That being said, if you are working in a trusted environment, your best bet would probably be to code an ActiveX control to perform the execution. This can be done by calling a function such as the Win32 ShellExecuteEx function from your ActiveX control. A hosted Java applet or .NET custom control (of the WinForm variety) may also be able to accomplish the task if you can elevate their permissions. Hope that helps. :) --Jesse

          A Offline
          A Offline
          Ahmed Galal
          wrote on last edited by
          #4

          but i'd like to know somthin, does the custom controls runs on the client ?

          J 1 Reply Last reply
          0
          • A Ahmed Galal

            but i'd like to know somthin, does the custom controls runs on the client ?

            J Offline
            J Offline
            Jesse Squire
            wrote on last edited by
            #5

            By custom control, I'll assume that we're talking ActiveX, though most of the concepts would apply to a .NET custom WinForm control and Java applet. The control is installed and registered on the client system just like any other COM component or ActiveX control. It runs fully on the client machine. It is possible to create a web delivery package to be installed on demand. Believe it or not, this is one area where I've found the Visual Studio 6 package and deployment wizard to be pretty darn helpful. Once you have the package, you simply point to it through the HTML object tag, using codebase attribute. Most likely, you will also want to be sure and mark the control as "safe for scripting." Take a peek at the following for more information:

            • ActiveX Controls Overviews and Tutorials [^]
            • How Internet Explorer Determines If ActiveX Controls Are Safe[^]

            Hope that helps. :) --Jesse

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups