find the default browser
find the default browser
Hello Admin is there a way to find what the default browser is? :D
Thanks
Thanks
find the default browser
Thru the reg is "HKEY_CURRENT_USERSoftwareMicrosoftWindowsShellAssociationsUrlAssociationshttpUserChoiceProgid"
In my Pc it returns the FirefoxURL for firefox, now i have to compare this and tell the program to run firefox.
For the IE it returns IE.HTTP
In my Pc it returns the FirefoxURL for firefox, now i have to compare this and tell the program to run firefox.
For the IE it returns IE.HTTP
find the default browser
can you do it whit this?
`open default browser
if fileexists("blank.html")=false then
dim f as filestream
f.open("blank.html")
f.close
end if
best regards
open("blank.html")
`open default browser
if fileexists("blank.html")=false then
dim f as filestream
f.open("blank.html")
f.close
end if
best regards
open("blank.html")
find the default browser
Hello admin, thanks for the reply, but what i want is to see what is the default brawser so i could run some links without using, lets say, allways the internet explorer.
The only thing i need to know now is the reg progid of chrome.
Thanks :D
The only thing i need to know now is the reg progid of chrome.
Thanks :D
find the default browser
Hi, can you do it with this code?
dim reg as registry
dim browser as string
browser= reg.readkey("HKEY_CLASSES_ROOThtmlfileshellopencommand")
browser=browser-chr$(34)
browser=left$(browser,instr(browser,".")+4)
showmessage browser
shell(browser)
best regards
dim reg as registry
dim browser as string
browser= reg.readkey("HKEY_CLASSES_ROOThtmlfileshellopencommand")
browser=browser-chr$(34)
browser=left$(browser,instr(browser,".")+4)
showmessage browser
shell(browser)
best regards
find the default browser
[quote author=7471787C7B150 link=1350052683/4#4 date=1350145031]Hi, can you do it with this code?
dim reg as registry
dim browser as string
browser= reg.readkey("HKEY_CLASSES_ROOThtmlfileshellopencommand")
browser=browser-chr$(34)
browser=left$(browser,instr(browser,".")+4)
showmessage browser
shell(browser)
best regards[/quote]
That code gives me allways the internet explorer, i did it like this:
[code]
dim reg as registry
dim key as string
` for the default web browser
key="HKEY_CURRENT_USERSoftwareMicrosoftWindowsShellAssociationsUrlAssociationshttpUserChoiceProgid"
dim path as string
path=reg.readkey(key)
`for the program files folder
dim reg1 as registry
dim key1 as string
key1="HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionProgramFilesDir"
dim path1 as string
path1=reg.readkey(key1)
` see if is internet explorer
if path ="IE.HTTP" then
run path1+"Internet Exploreriexplore.exe","www.facebook.com",3
End if
if path ="FirefoxURL" then
run path1+"Mozilla Firefoxfirefox.exe","www.facebook.com",3
end if
if path="ChromeHTML" then
run path1+"GoogleChromeApplicationchrome.exe","www.facebook.com",3
End if
[/code]
It works well in Seven, must test it in xp. :D
Thanks for the help.
dim reg as registry
dim browser as string
browser= reg.readkey("HKEY_CLASSES_ROOThtmlfileshellopencommand")
browser=browser-chr$(34)
browser=left$(browser,instr(browser,".")+4)
showmessage browser
shell(browser)
best regards[/quote]
That code gives me allways the internet explorer, i did it like this:
[code]
dim reg as registry
dim key as string
` for the default web browser
key="HKEY_CURRENT_USERSoftwareMicrosoftWindowsShellAssociationsUrlAssociationshttpUserChoiceProgid"
dim path as string
path=reg.readkey(key)
`for the program files folder
dim reg1 as registry
dim key1 as string
key1="HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionProgramFilesDir"
dim path1 as string
path1=reg.readkey(key1)
` see if is internet explorer
if path ="IE.HTTP" then
run path1+"Internet Exploreriexplore.exe","www.facebook.com",3
End if
if path ="FirefoxURL" then
run path1+"Mozilla Firefoxfirefox.exe","www.facebook.com",3
end if
if path="ChromeHTML" then
run path1+"GoogleChromeApplicationchrome.exe","www.facebook.com",3
End if
[/code]
It works well in Seven, must test it in xp. :D
Thanks for the help.
find the default browser
This does not work on XP, because the regkey for the default browser is diferent :(.
find the default browser
Maybe this will do ???
best regards
``get default browser
declare FindExecutable as "FindExecutableA" of "shell32.dll"
lpFile As String
lpDirectory As String
lpResult As String byaddress
end declare
function getdefaultbrowser as string
dim f as filestream
f.open("htmpl.htm")
f.close
FindExecutable.lpfile="htmpl.htm"
FindExecutable.lpDirectory=exepath
FindExecutable.execute
result=FindExecutable.lpresult
kill "htmpl.htm"
end function
showmessage getdefaultbrowser
best regards
``get default browser
declare FindExecutable as "FindExecutableA" of "shell32.dll"
lpFile As String
lpDirectory As String
lpResult As String byaddress
end declare
function getdefaultbrowser as string
dim f as filestream
f.open("htmpl.htm")
f.close
FindExecutable.lpfile="htmpl.htm"
FindExecutable.lpDirectory=exepath
FindExecutable.execute
result=FindExecutable.lpresult
kill "htmpl.htm"
end function
showmessage getdefaultbrowser
find the default browser
[quote author=4C494044432D0 link=1350052683/7#7 date=1350401690]Maybe this will do ???
best regards
``get default browser
declare FindExecutable as "FindExecutableA" of "shell32.dll"
lpFile As String
lpDirectory As String
lpResult As String byaddress
end declare
function getdefaultbrowser as string
dim f as filestream
f.open("htmpl.htm")
f.close
FindExecutable.lpfile="htmpl.htm"
FindExecutable.lpDirectory=exepath
FindExecutable.execute
result=FindExecutable.lpresult
kill "htmpl.htm"
end function
showmessage getdefaultbrowser
[/quote]
Yes that works very good, can you care to explain a bit?
Thanks :D
best regards
``get default browser
declare FindExecutable as "FindExecutableA" of "shell32.dll"
lpFile As String
lpDirectory As String
lpResult As String byaddress
end declare
function getdefaultbrowser as string
dim f as filestream
f.open("htmpl.htm")
f.close
FindExecutable.lpfile="htmpl.htm"
FindExecutable.lpDirectory=exepath
FindExecutable.execute
result=FindExecutable.lpresult
kill "htmpl.htm"
end function
showmessage getdefaultbrowser
[/quote]
Yes that works very good, can you care to explain a bit?
Thanks :D
find the default browser
yes, it creates a temporalely html file then look with an api call of windows with what execute it will be opened. Then it shows the path and name of that executable and erase (kill) the temp file.
The windows functioncall is findexecutable.
best regards
The windows functioncall is findexecutable.
best regards