1

For debugging purposes it'd be nice if I could make my error page display clickable file names in exception stack traces that would open them up in my favorite editor. However this would require me to execute a full command line - a simple link to a file will not do. Can this be done?

The solution can be IE-only and it can use techniques that require full trust (I don't expect it to be otherwise anyway). People are only going to use this on localhost, I will in fact disable this functionality when viewing the page remotely.

Community
  • 1
  • 1
Vilx-
  • 104,512
  • 87
  • 279
  • 422
  • Hesitant to close this as a dupe of this: http://stackoverflow.com/questions/1738573/easiest-way-to-execute-local-file-from-firefox because of the Firefox focus, but the accepted answer is what I would answer here. – Pekka Aug 25 '10 at 14:39

1 Answers1

5

You can add a new protocol to Windows as outlined here .

This is especially nice because it works across browsers, and doesn't require any browser specific settings.

Just be careful with it - adding a new protocol handler opens potential, although very remote, vulnerabilities. When setting this up, never let the incoming URL be somehow a parameter to a generic command interpreter (like cmd). Always link it to an existing application that is not able to do anything destructive, not even through command line switches.

user187291
  • 53,363
  • 19
  • 95
  • 127
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Hooray! It will do! :) It says here that I will be able to accept your answer in 5min, so I'll so it then. – Vilx- Aug 25 '10 at 14:46