HTML is not a programming language. It is not with HTML that this is possible, but rather with scripting languages such as Javascript and VBScript.
With no language you can do this from a browser . The reason is security. If it were possible to run programs arbitrarily on the client machine, it would not be difficult for a hacker to force a malicious code to be compiled and run on his machine. At the very least you would have to get all the passwords stored on your computer, and in the worst case you would give access to your bank accounts to a stranger.
Windows has an executable called Wscript.exe. I'll leave it to anyone who is curious to meet you. This executable is able to execute Javascript locally, with administrator permissions. The environment is different from the browser - you will not have access to various things like Web Storage . On the other hand, objects like ShellObject
become accessible, and you can even manipulate files.
I'm not an expert at Node.js
, but since it's a server environment and not a client, you're able to access more operating system resources with it than via browser in a way. But I'm not sure if it is able to access ShellObject
.
In addition to the node and Wscript, there are a number of other Javascript environments that allow to foe alien machines and destroy files to access operating system components less restrictively than via browser. It's just a matter of searching.
Now, if the intention was to actually access the shell from the browser ... Instead of Javascript use COM or ActiveX components. And understand that this will probably only work in Internet Explorer, version 6 or lower. Good luck.