Hi All,
I'm trying to create an Active X component that will start an application on a client machine. I've created an Active X control which is quite straight forward in .NET. ALl it does is call the Process class and call Start.
Now i want to be able to call the starting method on this class from javascript passing in a few parameters on the page (which are then passed down as command line arguments).
I followed the guide here: http://www.c-sharpcorner.com/UploadFile/mgold/HyperlinkExec03012007191054PM/HyperlinkExec.aspx
This guide talks about using a hyperlink to start the javascript but i'm using a button. Here is my HTML (i'm trying this in just plain HTML instead of ASP.NET to keep things simple for now but i want to go to ASP.NET eventually)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body>
<button type="button" onclick="javascript:launch()">Click me!</button>
<script type="text/javascript">
function launch()
{
alert('test')
var myLauncher = new ActiveXObject('CardWriterApplicationLauncher');
myLauncher.LaunchCardWriter('test', 'test', 'test');
}
</script>
</body>
</html>
How when i click the button i get the error "Automation server can't create object". I know that my COM dll is registered properly in the GAC and with regasm, so what could i be doing wrong?
Also any alternative solutions to launching the application on the users desktop from a web page would be greatly appreciated. Browser security setting can be modified as required as the client PCs are under our control and are on a private network with no internet access.
Thanks