Is there a way to call a local script (on the client)?

I want to use a button to trigger a local/client script (say a bat script). I know this is not trivial but I also know that it should be possible. In a previous live I have seen this working but I don't know how it was done. Does anyone know of a way to get this to work and of possible (e.g. security) consequences to take into account?
2 answers

The only ways I know to execute code outside the browser is Flash, ActiveX or Java. User will have to give permission for executing.


If that were possible that'd be a huge security gap in every browser.