| View previous topic :: View next topic |
| Author |
Message |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 412 Location: Tehran, Iran
|
Posted: 20/07/04 09:35 Post subject: Default Browser |
|
|
Does anybody know how can I set the default browser to my own application?
Any help would be appreciated.
Cheers,
Kambiz |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 154
|
Posted: 20/07/04 18:38 Post subject: |
|
|
| God... i tried to deal with it half year ago & what i know for shure is that it's stored in registry in direct InternetExplorer Settings or it has to deal with extension of html files, the way you can search for it is to set as default browser som non-standard browser and search in registry for values=path of that browser... i'm sure it was working with default editor. |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 412 Location: Tehran, Iran
|
Posted: 21/07/04 07:05 Post subject: |
|
|
I know where XP keeps the list of installed browsers, and I can add my browser to the list and set it as default. Also, I have no problem on associating relative file types to my application.
However, I couldn't find yet how to associate my browser to the URLs. |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 412 Location: Tehran, Iran
|
Posted: 21/07/04 10:11 Post subject: |
|
|
I found the answer.
The association for the protocols is as same as file types. |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 154
|
Posted: 25/07/04 16:28 Post subject: |
|
|
| Can You show me where's it's stored, and how to get/set it? |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 412 Location: Tehran, Iran
|
Posted: 25/07/04 22:46 Post subject: |
|
|
The following is the Inno Setup script I wrote for this purpose.
| Code: | [Tasks]
Name: DefaultBrowser; Description: Set QualiWEB Pro as your default &browser
[Registry]
; --- Start Menu Internet
Root: HKLM; SubKey: SOFTWARE\Clients\StartMenuInternet\QWP.EXE; ValueType: string; ValueData: QualiWEB Pro; Flags: uninsdeletekey noerror; Check: StartMenuInternetExists
Root: HKLM; SubKey: SOFTWARE\Clients\StartMenuInternet\QWP.EXE\DefaultIcon; ValueType: string; ValueData: """{app}\QWP.EXE"",0"; Flags: uninsdeletekey noerror; Check: StartMenuInternetExists
Root: HKLM; SubKey: SOFTWARE\Clients\StartMenuInternet\QWP.EXE\shell\open\command; ValueType: string; ValueData: """{app}\QWP.EXE"""; Flags: uninsdeletekey noerror; Check: StartMenuInternetExists
Root: HKCU; Subkey: SOFTWARE\Clients\StartMenuInternet; ValueType: string; ValueData: QWP.EXE; Flags: uninsdeletevalue noerror dontcreatekey; Tasks: DefaultBrowser; Check: StartMenuInternetExists
; --- End of Start Menu Internet
; --- Protocol & File Type Associations
Root: HKCR; Subkey: http\shell\open\command; ValueType: string; ValueData: """{app}\QWP.EXE"" %1"; Flags: uninsdeletevalue noerror dontcreatekey; Tasks: DefaultBrowser
Root: HKCR; Subkey: http\shell\open\ddeexec; ValueType: none; Flags: noerror dontcreatekey deletekey; Tasks: DefaultBrowser
Root: HKCR; Subkey: https\shell\open\command; ValueType: string; ValueData: """{app}\QWP.EXE"" %1"; Flags: uninsdeletevalue noerror dontcreatekey; Tasks: DefaultBrowser
Root: HKCR; Subkey: https\shell\open\ddeexec; ValueType: none; Flags: noerror dontcreatekey deletekey; Tasks: DefaultBrowser
Root: HKCR; Subkey: htmlfile\shell\open\command; ValueType: string; ValueData: """{app}\QWP.EXE"" %1"; Flags: uninsdeletevalue noerror dontcreatekey; Tasks: DefaultBrowser
Root: HKCR; Subkey: htmlfile\shell\opennew\command; ValueType: string; ValueData: """{app}\QWP.EXE"" %1"; Flags: uninsdeletevalue noerror dontcreatekey; Tasks: DefaultBrowser
; --- End of Protocol & File Type Associations
[_code]
function StartMenuInternetExists: Boolean;
begin
Result := RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Clients\StartMenuInternet');
end; |
Consider that because for sending a URL to a running instance of the application, I don't use DDE, I've deleted the related registry entry to perevent Windows error message.
Hope that it helps.
Kambiz |
|
| Back to top |
|
 |
|