Force file extension to match file type: wartość rejestru extensionhardeningUżytkownikHKCU\software\policies\microsoft\office\16.0\excel\security

Brak oficjalnego tekstu w tym języku (wyświetlono oryginał angielski)

Identyfikator zasady
L_Forcefileextenstionstomatch
Zakres
Konfiguracja użytkownika
Obsługiwane w systemach
System Windows Server 2008 R2 lub nowszy albo system Windows 7
Źródło
Microsoft 365 Apps / Office Administrative Templates (wersja 5568.1000)
Kategoria
Microsoft Excel 2016 › Excel Options › Security

Rejestr

extensionhardening

REG_DWORDUżytkownik
Wartość włączona
Zależy od wartości opcji
Element
-
Opcje
PozycjaZapisana wartość
Allow different0
Allow different, but warn1
Always match file type2
Zastosuj przez .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\security]

; Opcje (użyj tylko jednej)
; Allow different
"extensionhardening"=dword:00000000
; Allow different, but warn
"extensionhardening"=dword:00000001
; Always match file type
"extensionhardening"=dword:00000002
CMD
:: Opcje (użyj tylko jednej)

:: Allow different
reg add "HKCU\software\policies\microsoft\office\16.0\excel\security" /v "extensionhardening" /t REG_DWORD /d 0 /f
:: Allow different, but warn
reg add "HKCU\software\policies\microsoft\office\16.0\excel\security" /v "extensionhardening" /t REG_DWORD /d 1 /f
:: Always match file type
reg add "HKCU\software\policies\microsoft\office\16.0\excel\security" /v "extensionhardening" /t REG_DWORD /d 2 /f
PowerShell
# Wspólne: utwórz klucz
New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security' -Force | Out-Null

# Opcje (użyj tylko jednej)
# Allow different
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security' -Name 'extensionhardening' -PropertyType DWord -Value 0 -Force | Out-Null
# Allow different, but warn
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security' -Name 'extensionhardening' -PropertyType DWord -Value 1 -Force | Out-Null
# Always match file type
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\excel\security' -Name 'extensionhardening' -PropertyType DWord -Value 2 -Force | Out-Null