Jump to content
morejava

Open in Chrome OR IE - (Moved)

Recommended Posts

Hey all.  Is there a way to say IF they have Chrome open this, ELSEIF they don't have Chrome open in IE.

Thanks for your help.

Case $Button6
            ShellExecute("https://www.website.com/test")

 

Share this post


Link to post
Share on other sites

You can read registry like this :

#include <Constants.au3>

Opt("MustDeclareVars", 1)

RunBrowser()

; return PID of the process
Func RunBrowser()
  Local $sPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe", "")
  If Not @error Then Return Run($sPath)
  $sPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE", "")
  If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "No browser available")
  Return Run($sPath)
EndFunc   ;==>RunBrowser

 

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

×
×
  • Create New...