<script type="text/javascript"> function Launch() { alert("-1"); try { var ws = new ActiveXObject("WScript.Shell"); var servername = "<%=Server.MachineName%>"; var exename = "\\\\Uszz\\interoffice\\Training\\Coll Mod - Datastore\\PROD\\\\setup.exe"; ws.Exec(exename.replace("Server", servername)); return true; } catch (ex) { alert(ex); } } </script>
web server read the exe from disk and send it back in the response. The user will then be able to choose whether to open, save, or discard the file.Please
public ActionResult DownloadSetup() { string path = @"C:\Some\File\Path\Here\setup.exe"; return File(path, "application/octet-stream", "setup.exe"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)