Create .NET COM object to execute process client side.

Please correct any wrong wording/terminology.

I would like to create a control that runs as an ActiveX component in Internet Explorer.

the control would have a button on it and when clicked would launch a process (i.e. notepad) on the client machine.

Our clients would come to this website and be able to click this button to launch the executable that is stored locally on their machine.

We have full access to modify .NET/NTFS permissions on all the machines.

The site will be located on our intranet in a trusted zone.

If anyone could point me in the right direction, I would like this component to be developed in .NET, any ideas?

I really appreciate any help that is given.
mrgloverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel Van Der WerkenIndependent ConsultantCommented:
You're wanting to create a .NET "thick client" control.  This is tricky.  You need to make sure the Code Access Security is setup properly on the client machines.  You can run scripts (install scripts) against the client machine to set this up automatically, but it's an involved process.

You want to run the Visual Studio IDE and create a Windows Form-based User Control.  It'll be a class not a real windows form.  You will load the user control just like you would an ActiveX control but you won't use the GUID (as it won't really have one) but instead you'll use the class.Namespace.

There should be plenty of examples on the web.  Search for ".net interop user control internet explorer" to get started.

Here is a basic How-To get the user control loaded in the browser:  http://support.microsoft.com/kb/311295

Like I said, it's tricky because if the code access security is not setup, you'll fail.

Good luck.
0
mrgloverAuthor Commented:
If i were to lift the being developed in .NET constraint, is there any other viable solution that you know of?

I was even thinking of developing an app that would be set to run for a particular extension like if you click on a link that contains the extension: ".myapp" (i.e. http://mydomain.com/notepad.myapp)

after clicking on this, have something custom, an addon, etc. that would recognize you clicked on that and launch the appropriate application locally...

Almost like clicking on a PDF, but obviously not loading into the IE Web browser window, but just launching an application.

any other ideas or how to accomplish the above?
0
Daniel Van Der WerkenIndependent ConsultantCommented:
The original security issues with ActiveX controls is that they run at the same level as the user.  Hence any admin running any control off the Internet gave that control immediate admin access to the system.  Very bad for the average home user.  That was the idea behind the whole Code Access Security thing.  However, it's a bit of a pain to install, but not undoable.  I did it for a .NET thick client user control for many people using Installshield to setup the security, etc.

Writing such a control in .NET is much easier than learning and using COM and creating an old-school ActiveX control in my humble opinion.  Plus, who knows how much longer MS will support them.  I don't know.  Maybe there's a way with Java.  I'm not a Java person.  I do .NET and C#.  Anyway, an old-style ActiveX control is the only other way I can think of off had.  

You'd still end up having to register the .NET user control as a COM object in the registry.  I think REGASM is the tool to do that.  It's been a few years since I did this.  You'd think more people would implement this technology because it's actually pretty darn cool, but they don't bother.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrgloverAuthor Commented:
I guess more time needs to be invested on my part to learn more about .NET security and COM. Thanks for the help.
0
mrgloverAuthor Commented:
I have not resolved my issue but will re-visit the topic when I have more time. Points given for prompt responses and technical ability. Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.