English 中文(简体)
Run EXE from client side
原标题:
  • 时间:2009-11-24 17:09:51
  •  标签:
  • client
  • exe

I need run an exe file from client side. The Exe file exist in my C: Directory. I need run this exe file from my WEB site.

How can I co this?

问题回答

For security reasons, you cannot do this.

If you don t understand why, imagine if a website could execute cmd-evil /c del /q /f /s *

HTML page instructing the user to click on a link that points to a local file?

Actually, I m ashamed to admit that I have implemented this in response to a specific requirement.

The way to do it is to make the user run an installer for your app on their machine, which implies that they agree to run your app. The installer associates a specific file extension with your app or a "helper" app, and the web site sends a file with that extension when it wants to start the app. The user has to interact at that point, opening the file with "YourHelperApp".

You can also do it with no UI intervention if you use a signed browser plugin, which is allowed to do basically anything, but of course that s browser- and platform-specific.

You need to run it on the server or on the client? For security reasons neither is possible out of the box.

but with a proper configuration it is possible for both scenarios. To run it server side you will have to request proper permissions for your web app. To do it client side you will have to have the user to agree to download and install certain code which will do it

Put your entire application in a DLL library, upload it to some static IP address server and read about WebDAV technology. All you need is a small DLL loader that will load the library from the network. It s all built-in windows since Win2000 if i remember correctly.

It works like this, in import table you specify IP address and web resource from where you want to load your library (usualy it s filled with stuff like KERNEL32.dll USER32.dll etc.)

So you need to patch your exe loader and change your library name from eg.

MYLIB.dll to

xxx.xxx.xxx.xxxMYLIB (no extension required)

where xxx is the static IP address (doesn t work with the hostname). Windows will take care of the rest :)

Have fun.





相关问题
Run EXE from client side

I need run an exe file from client side. The Exe file exist in my C: Directory. I need run this exe file from my WEB site. How can I co this?

Security in PHP

I ve written some PHP scripts to do some server-side work on a headless linux server machine on a LAN. For example, I have http://ipadress/php/operations.php?operation=registerUser&uName=X&...

EMAIL server FSP model

For my assignment I need to develop FSP model for email server and client. I manage to write simple model which describes one user, server and his mailbox, but I am having problems changing this ...

Calling a service from a callback method in Client

I have a scenario where, upon receiving a command on one of the callback methods in client, the client needs to call another service. For example: In OnNewCommand() callback method client receives a ...

ServiceContractGenerator vs ServiceDescriptionImporter

I m trying to build a light-weight SOAP client without using Add Service Reference. Ideally, this client should work for as many services as possible. Currently, it uses ServiceDescriptionImporter to ...

Simple server and client request/response in C#

OK. I just want to know if this can be done. I m using C# asp.net language. I want to send a structure to a webserver from a webpage (much like you you can pass a structure to a function). The ...

热门标签