Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to read registry and run an executable on client side from server.Is there a way of achieving this ???

I have Server side content management application running on PHP in a browser of every client.From the same browser when it runs on client, I want launch our application directly from browser.



Thanks in Advance
Posted
Updated 12-Nov-13 1:15am
v2
Comments
Sergey Alexandrovich Kryukov 12-Nov-13 3:04am    
Why?
—SA
[no name] 12-Nov-13 7:15am    
I have Server side content management application running on PHP in a browser of every client.From the same browser when it runs on client, I want launch our application directly from browser.

Short answer is: you cannot. Web applications don't have access to client-side system and are not allowed to do such things, by obvious security reasons. And you should not do it.

There is one dirty work-around, ActiveX control used in browser via JavaScript. My best advice would be: never go this way. Anyway, ActiveX use is not supported by all browsers and systems. More importantly, it would break security feature which I mentioned above. Actually, many computer-savvy users will never use your site if they learn that you use such dirty tricks. It would mean that you ignore very basic security considerations.

—SA
 
Share this answer
 
Comments
[no name] 12-Nov-13 7:16am    
I have Server side content management application running on PHP in a browser of every client.From the same browser when it runs on client, I want launch our application directly from browser.
Sergey Alexandrovich Kryukov 12-Nov-13 10:47am    
Do you understand why it is unacceptable due to security reasons? Why a client can trust your site such things. Anyone can inject any malicious code and execute it...
You did not explain any valid reason why would you need to run such application...
—SA
[no name] 12-Nov-13 23:33pm    
Thats what I have explained.We have developed an application for a client.Its an intranet network so the malicious intent is ruled out. Now we have developed content management solution for the client and at the end of content creation user is supposed to launch a dekstop application.

Now I have solved it myself very safely. At the end of it user will create a DB entry in a table and process running on client would check for the DB entry and automatically launches the client application.

Problem solved safely in a neat and clean method.
Sergey Alexandrovich Kryukov 13-Nov-13 0:23am    
Well, yes, intranet tool is one of the rare cases where ActiveX can be used. I would advise to avoid using ActiveX even in intranet development unless it is really unavoidable. Unfortunately, the real problem is the lack of standardization of certain inherently safe features, which leads to unsafe solutions. One such example is such a simple thing as a multiselect file dialog, which is badly needed to post multiple files. Standardization of such feature would immediately create a possibility to implement it in perfectly safe way (no different from what is possible with currently used Web forms), but available implementation use ActiveX...
—SA
[no name] 13-Nov-13 1:53am    
As I said there no Active X..we are handling it through database flag and process thread.Its a intranet where both the browser , application being launched are designed by us as per the requirement of the customer.Thankyou...
Here is the solution..

What I am doing is when I click to launch an application , am setting a flag and IP in the DB residing on the server.

A process thread running in the client.It continuously checks the DB table for flag and launches the application if the flag is set to true and then also deletes the entry in the table.So that the user can actually launch the multiple times.
 
Share this answer
 
Comments
Alexandru Lungu 12-Nov-13 13:43pm    
By "A process thread running in the client", you mean in your client app, not in the browser; which means that the your app must be already open...
Thats what I have explained.We have developed an application for a client.Its an intranet network so the malicious intent is ruled out. Now we have developed content management solution for the client and at the end of content creation user is supposed to launch a dekstop application.

Now I have solved it myself very safely. At the end of it user will create a DB entry in a table and process running on client would check for the DB entry and automatically launches the client application.

Problem solved safely in a neat and clean method.

As I said there no Active X..we are handling it through database flag and process thread.Its a intranet where both the browser , application being launched are designed by us as per the requirement of the customer.Thankyou...all for your valuable inputs...

anyone wants to know i can share more info on this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900