Control use of the Web Serial API: valor do Registro DefaultSerialGuardSettingComputadorHKLM\Software\Policies\Mozilla\Firefox

Sem descrição oficial em português (Brasil) (original em inglês exibido)

ID da política
DefaultSerialGuardSetting
Escopo
Configuração do Computador, Configuração do Usuário
Compatível com
Firefox 151 or later
Fonte
Mozilla Firefox Policy Templates (versão 8.3)
Categoria
Mozilla › Firefox

Registro

DefaultSerialGuardSetting

REG_DWORDComputadorUsuário
Valor habilitado
Depende do valor da opção
Elemento
-
Opções
ItemValor armazenado
Do not allow any site to request access to serial ports via the Web Serial API2
Allow sites to ask the user to grant access to a serial port3
Aplicar com .reg · CMD · PowerShell
ComputadorConfiguração global do computador
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox]

; Opções (use apenas uma)
; Do not allow any site to request access to serial ports via the Web Serial API
"DefaultSerialGuardSetting"=dword:00000002
; Allow sites to ask the user to grant access to a serial port
"DefaultSerialGuardSetting"=dword:00000003
CMD
:: Opções (use apenas uma)

:: Do not allow any site to request access to serial ports via the Web Serial API
reg add "HKLM\Software\Policies\Mozilla\Firefox" /v "DefaultSerialGuardSetting" /t REG_DWORD /d 2 /f
:: Allow sites to ask the user to grant access to a serial port
reg add "HKLM\Software\Policies\Mozilla\Firefox" /v "DefaultSerialGuardSetting" /t REG_DWORD /d 3 /f
PowerShell
# Comum: criar a chave
New-Item -Path 'HKLM:\Software\Policies\Mozilla\Firefox' -Force | Out-Null

# Opções (use apenas uma)
# Do not allow any site to request access to serial ports via the Web Serial API
New-ItemProperty -Path 'HKLM:\Software\Policies\Mozilla\Firefox' -Name 'DefaultSerialGuardSetting' -PropertyType DWord -Value 2 -Force | Out-Null
# Allow sites to ask the user to grant access to a serial port
New-ItemProperty -Path 'HKLM:\Software\Policies\Mozilla\Firefox' -Name 'DefaultSerialGuardSetting' -PropertyType DWord -Value 3 -Force | Out-Null
UsuárioConfiguração por conta
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Mozilla\Firefox]

; Opções (use apenas uma)
; Do not allow any site to request access to serial ports via the Web Serial API
"DefaultSerialGuardSetting"=dword:00000002
; Allow sites to ask the user to grant access to a serial port
"DefaultSerialGuardSetting"=dword:00000003
CMD
:: Opções (use apenas uma)

:: Do not allow any site to request access to serial ports via the Web Serial API
reg add "HKCU\Software\Policies\Mozilla\Firefox" /v "DefaultSerialGuardSetting" /t REG_DWORD /d 2 /f
:: Allow sites to ask the user to grant access to a serial port
reg add "HKCU\Software\Policies\Mozilla\Firefox" /v "DefaultSerialGuardSetting" /t REG_DWORD /d 3 /f
PowerShell
# Comum: criar a chave
New-Item -Path 'HKCU:\Software\Policies\Mozilla\Firefox' -Force | Out-Null

# Opções (use apenas uma)
# Do not allow any site to request access to serial ports via the Web Serial API
New-ItemProperty -Path 'HKCU:\Software\Policies\Mozilla\Firefox' -Name 'DefaultSerialGuardSetting' -PropertyType DWord -Value 2 -Force | Out-Null
# Allow sites to ask the user to grant access to a serial port
New-ItemProperty -Path 'HKCU:\Software\Policies\Mozilla\Firefox' -Name 'DefaultSerialGuardSetting' -PropertyType DWord -Value 3 -Force | Out-Null