Jump to content

Best simple way to open .htm file in browser


Recommended Posts

Using the @CompSpec with Run() is an easy option most people seem to use.

Another option is... _ShellExecute()

Hope that helps,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Thanks JS!

I like that ShellExecute method! Only problem I have with it, however, is that there's a chance the .htm file extension isn't associated with a browser. It could be associated with a html or text editor if they are web designers, for example (not that its a huge deal)

The @ComSpec method works on my test machine, thanks.

I also found this solution:

Run ( RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\HTTP\shell\open\command","") & " file://" & $reportfile )
but I'm not entirely sure how portable it is (works on XP anyway)

LD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...