How do I open a file with VBScript, as if the user had double clicked the file?
You can open and edit VBS files using any text editor, such as Notepad++ (Windows), Apple TextEdit (Mac), or GitHub Atom.
CreateObject("WScript.Shell").Run("C:\\Program Files\\my_html_files\\file.htm")
CreateObject("WScript.Shell").Run("""C:\Program Files\my_html_files\file.htm""")
And check the application registered with the .htm extension (probably IExplore.exe
), in these registry keys:
HKLM\SOFTWARE\Classes\.htm
HKLM\SOFTWARE\Classes\htmlfile\shell\open\command
HKCU\Software\Classes\.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With