If you host your site in a trusted or intranet IE zone, the following Javascript will work just fine. I use this inside to associate our database search with a PC with our remote screen management software:
<script type="text/javascript" language="javascript"> function runDameWare(strHostname, blControl) { var objShell = new ActiveXObject("Wscript.Shell"); var strCommand = "C:\\Program Files\\Dameware\\dwrcc.exe -c: -h: -m:"; strCommand += strHostname; if (blControl) { strCommand += " -v:"; } objShell.Exec(strCommand); } </script>
I understand that downloading the results of your work in a local program to a web server can be done using the HttpWebRequest class, as shown in this article:
http://forums.asp.net/p/1482778/3464854.aspx
Edit: This is how I call the function above. Basically, I just present a simple <a> element with an onclick attribute. There is probably a cleaner way to do this, but it works:
Markup:
<asp:TemplateField> <ItemTemplate> <%# RenderDameWareLinks(Eval("ResourceName"))%> </ItemTemplate> </asp:TemplateField>
the code:
Protected Function RenderDameWareLinks(ByVal strHostname As String) As String Dim strFullLink As String = String.Empty Dim strViewLink As String = String.Empty strFullLink = "<a onclick=""runDameWare('" & strHostname & "', false);"">" strFullLink &= "<img alt=""Connect using DameWare"" src=""Image/dameware1.gif"" style=""padding: 2px;"" />" strFullLink &= "</a><br/>" strViewLink = "<a onclick=""runDameWare('" & strHostname & "', true);"">" strViewLink &= "<img alt=""Connect (View Only) using DameWare"" src=""Image/dameware2.gif"" style=""padding: 2px;"" />" strViewLink &= "</a>" Return strFullLink & strViewLink End Function
pseudocoder
source share