Yes, if you use Internet Exlorer, but you will need to maintain low IE security settings to run it, and even then you may be asked for confirmation. It all depends on which version and Windows SP, which security updates, which version of IE and what settings in IE.
I suggest taking a look at why you will start a local script this way. You can easily create and distribute a shortcut that runs your script without any configuration or hint problems.
Ik you need a user interface in which you can use the built-in VBScript, or you could use the .HTA file instead of the .html or .asp file, security is less associated with these files.
example: test.html
<script type="text/vbscript" src="c:\temp\test.vbs"></script>
and test.vbs
Const ForReading = 1, ForWriting = 2 Set fso = CreateObject("Scripting.FileSystemObject") Set writefile = fso.OpenTextFile("c:\temp\output.txt", ForWriting, True) writefile.write "test" writefile.close
When I load test.html, I get two requests, and when I confirm, I get output.txt in c: \ temp
And the last example here is an .hta file, save it, for example, test.hta, also use IE when using ActiveX or Vbscript
<HTML> <HEAD> <SCRIPT language="VBScript"> </SCRIPT> </HEAD> <BODY> </BODY> </HTML>
or
<HTML> <HEAD> <script type="text/vbscript"> sub test const runminimized = 7 const dont_wait_for_end = false Set wshShell = CreateObject("WScript.Shell") WshShell.Run "c:\temp\test.vbs",runminimized, dont_wait_for_end end sub </script> </HEAD> <BODY> these are the instructions <button onclick="vbscript:test" >Run the script</button> </BODY> </HTML>