lostbit Posted January 17, 2011 Posted January 17, 2011 (edited) I am trying to use run or send to launch firefox browser. In windows 7 run window I type firefox and it starts. I tried Run("firefox") I tried firefox.exe no joy. I then tried to use the full path and I get errors. Here I may not be using the proper path string. Any help will be usefull. Edited January 17, 2011 by lostbit
DCCD Posted January 17, 2011 Posted January 17, 2011 $FF = @ProgramFilesDir & "\Mozilla Firefox\firefox.exe" If FileExists($FF) Then MsgBox(4096, '', $FF & " Exists, press OK to start FF") Run($FF) Else MsgBox(4096, $FF, "Does NOT exists") EndIf [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
Tankbuster Posted January 17, 2011 Posted January 17, 2011 (edited) Just a small enhancement..(to find the EXE with registry and fallback to the guessed path) $FF=RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe","") if $FF == "" then $FF = @ProgramFilesDir & "\Mozilla Firefox\firefox.exe" If FileExists($FF) Then MsgBox(4096, '', $FF & " Exists, press OK to start FF") Run($FF) Else MsgBox(4096, $FF, "Does NOT exists") EndIf Edited January 17, 2011 by Tankbuster
lostbit Posted January 17, 2011 Author Posted January 17, 2011 Shouldnt Shellexecute("Firefox") work ?YEP, that did it and I thank you so much.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now