HKCU registry keys can't use classes

Antworten
Benutzeravatar
SisterOfMercy
Beiträge: 1521
Registriert: 22 Jun 2012, 19:18

HKCU registry keys can't use classes

Beitrag von SisterOfMercy »

To set the default browser to mozilla firefox, and keep mozilla firefox from whining, you have to set a few things in HKCU\Classes. This does not work, because this is in a registry file that opsi never loads.

Code: Alles auswählen

[Registry_install_AllProfiles]
deletekey [HKEY_CURRENT_USER\Software\Classes\.htm]
deletekey [HKEY_CURRENT_USER\Software\Classes\.html]
deletekey [HKEY_CURRENT_USER\Software\Classes\.shtml]
deletekey [HKEY_CURRENT_USER\Software\Classes\.xht]
deletekey [HKEY_CURRENT_USER\Software\Classes\.xhtm]
deletekey [HKEY_CURRENT_USER\Software\Classes\.xhtml]
deletekey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML]
deletekey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL]
deletekey [HKEY_CURRENT_USER\Software\Classes\ftp]
deletekey [HKEY_CURRENT_USER\Software\Classes\http]
deletekey [HKEY_CURRENT_USER\Software\Classes\https]

openkey [HKEY_CURRENT_USER\Software\Classes\.htm]
set "" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Classes\.html]
set "" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Classes\.shtml]
set "" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Classes\.xht]
set "" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Classes\.xhtm]
set "" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Classes\.xhtml]
set "" = "FirefoxHTML"

; FirefoxHTML
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML]
set "" = "Firefox HTML Document"
set "FriendlyTypeName" = "Firefox HTML Document"
set "EditFlags" = REG_DWORD:00000002
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\DefaultIcon]
set "" = '"$InstallDir$\firefox.exe",1'
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\shell]
set "" = "open"
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\shell\open\command]
set "" = REG_SZ:'"$InstallDir$\firefox.exe" -osint -url "%1"'
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\shell\open\ddeexec]
set "" = ""

; FirefoxURL
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL]

Also see here: https://forum.opsi.org/viewtopic.php?p=36381#p36381

Oh wait, I can read there you guys (and gals) have opened an internal ticket. Well, how's it going?


set "" = "Firefox URL"
set "FriendlyTypeName" = "Firefox URL"
set "URL Protocol" = ""
set "EditFlags" = REG_DWORD:00000002
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL\DefaultIcon]
set "" = '"$InstallDir$\firefox.exe",1'
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL\shell]
set "" = "open"
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL\shell\open\command]
set "" = '"$InstallDir$\firefox.exe" -osint -url "%1"'
openkey [HKEY_CURRENT_USER\Software\Classes\FirefoxURL\shell\open\ddeexec]
set "" = ""

; ftp
openkey [HKEY_CURRENT_USER\Software\Classes\ftp]
set "URL Protocol" = ""
set "EditFlags" = REG_DWORD:00000002
openkey [HKEY_CURRENT_USER\Software\Classes\ftp\DefaultIcon]
set "" = '"$InstallDir$\firefox.exe",1'
openkey [HKEY_CURRENT_USER\Software\Classes\ftp\shell]
set "" = "open"
openkey [HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\command]
set "" = '"$InstallDir$\firefox.exe" -osint -url "%1"'
openkey [HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec]
set "" = ""

; http
openkey [HKEY_CURRENT_USER\Software\Classes\http]
set "URL Protocol" = ""
set "EditFlags" = REG_DWORD:00000002
openkey [HKEY_CURRENT_USER\Software\Classes\http\DefaultIcon]
set "" = '"$InstallDir$\firefox.exe",1'
openkey [HKEY_CURRENT_USER\Software\Classes\http\shell]
set "" = "open"
openkey [HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
set "" = '"$InstallDir$\firefox.exe" -osint -url "%1"'
openkey [HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec]
set "" = ""

; https
openkey [HKEY_CURRENT_USER\Software\Classes\https]
set "URL Protocol" = ""
set "EditFlags" = REG_DWORD:00000002
openkey [HKEY_CURRENT_USER\Software\Classes\https\DefaultIcon]
set "" = '"$InstallDir$\firefox.exe",1'
openkey [HKEY_CURRENT_USER\Software\Classes\https\shell]
set "" = "open"
openkey [HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
set "" = '"$InstallDir$\firefox.exe" -osint -url "%1"'
openkey [HKEY_CURRENT_USER\Software\Classes\https\shell\open\ddeexec]
set "" = ""

openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.htm\UserChoice]
set "Progid" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice]
set "Progid" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.shtml\UserChoice]
set "Progid" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xht\UserChoice]
set "Progid" = "FirefoxHTML"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xhtml\UserChoice]
set "Progid" = "FirefoxHTML"

openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice]
set "Progid" = "FirefoxURL"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice]
set "Progid" = "FirefoxURL"
openkey [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice]
set "Progid" = "FirefoxURL"

openkey [HKEY_CURRENT_USER\Software\Mozilla\Firefox\Crash Reporter]
set "SubmitCrashReport" = REG_DWORD:00000000
Also see here: viewtopic.php?p=36381#p36381

Oh wait, I see you guys and gals have already opened an internal ticket. Well, how's it going with that?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: HKCU registry keys can't use classes

Beitrag von n.wenselowski »

Hi SisterOfMercy,

the registry this keeps bugging you, doesn't it?
SisterOfMercy hat geschrieben:Also see here: viewtopic.php?p=36381#p36381

Oh wait, I see you guys and gals have already opened an internal ticket. Well, how's it going with that?
I did bump our internal ticket as this is not yet marked as resolved.
If there is nothing happening here in a few feeks please feel free to bump this topic!


With kind regards

Niko

Code: Alles auswählen

import OPSI
Benutzeravatar
SisterOfMercy
Beiträge: 1521
Registriert: 22 Jun 2012, 19:18

Re: HKCU registry keys can't use classes

Beitrag von SisterOfMercy »

n.wenselowski hat geschrieben: I did bump our internal ticket as this is not yet marked as resolved.
If there is nothing happening here in a few feeks please feel free to bump this topic!
Well.. a few weeks turned into a year. ;)
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
SisterOfMercy
Beiträge: 1521
Registriert: 22 Jun 2012, 19:18

Re: HKCU registry keys can't use classes

Beitrag von SisterOfMercy »

Uhmm, where exactly in the code is the part of the registry keys?
It is probably told somewhere to use ntuser.dat in that-and-that location.

Maybe I can split it up like this:

Code: Alles auswählen

Registry_install_AllProfiles /AllNTUserDats
Registry_install_HKCU_Classes /AllNTUserDats /Classes

or

Registry_install_AllProfiles /AllNTUserDats
Registry_install_HKCU_Classes /AllNTUserClasses
It is not used often, so in these special cases, it shouldn't be to big of a problem to use another registry key section for this.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten