Sign in to follow this  
Followers 0
LondonNDIB

Best simple way to open .htm file in browser

3 posts in this topic

I'm sure there's a ton of ways to do it and I'm sure its been asked/answered before.

What do you think the best (but simple) method for opening a local .htm file in the client's default browser is? Thanks.

LD

Share this post


Link to post
Share on other sites



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)

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0