iis - How can I open an .EXE file from an ASP.NET site? -


can open executable files on client machine asp.net site hosted on iis?

i have tried using following code in asp.net:

process notepad = new process();  notepad.startinfo.filename = "notepad.exe"; notepad.startinfo.arguments = @"e:\abc.txt";  notepad.startinfo.createnowindow = false; notepad.startinfo.useshellexecute = false; notepad.startinfo.redirectstandardoutput = false;  notepad.start(); 

and in javascript following code:

function launch() {     var w = new activexobject("wscript.shell");     w.run('notepad.exe');     return true; } 

but both snippets open file when site not hosted in iis.

any appreciated. thank in advance.

you not able launch executable on client (the computer running browser) under pretty circumstance...

your code in c# lives on server looks trying run notepad if working opening notepad instances on server...not client.

if did manage allow client give permissions run notepad (a big if), you'd want show if machine wasn't windows pc (e.g. not having notepad in first place)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -