Hi ,

I am new to c# , I want to know how to develop ActiveXControls in c# ,Can you let me know some samples if you have.

My Requirement is : to run an Exe which is residing on the Client machine .

I.e in the web page i will ask the user to select the exe path (in to a text box),
and on click of a button in webpage i want to run the exe which is on client machine(path will be in the text box)

can you tell me how to achieve this ,(Is it require activeX .. etc)

Hi,
I think it is not possible for security reason.

Hi <
Thank you for your reply,
If i know the location of exe on client machine then also is it not possible to start executing that exe on click of a button from webpage (using any javascript .. or any thing .)?

with regards and thanks,
santhosh k r

If you know the location of exe on client machine then also it is not possible. I think if such script in your webpage it may be blocked by browser.

I am not exact. but this is should not be possible, because any website can run exes in any computer, and can make harm to that computer.

If you know the location of exe on client machine then also it is not possible. I think if such script in your webpage it may be blocked by browser.

I am not exact. but this is should not be possible, because any website can run exes in any computer, and can make harm to that computer.

--------

Hi,

I had similar requirement,we can do that using javascript ,but the browser should have active x scripting enabled.

If that is fine you can use

<script language="JavaScript" type="text/javascript">  
         obj= new ActiveXObject( "WScript.Shell" )  
         function RunExe()   
         {  
            obj.Run("notepad.exe") ;  
        }  
      
    </script>

for more info check this link
http://www.dotnetspider.com/resources/19547-Run-exe-file-Java-Script.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.