Windows 탐색기 열 너비를 100픽셀 미만으로 설정

Windows 탐색기 열 너비를 100픽셀 미만으로 설정

"파일 확장자" 열의 너비를 더 줄이고 싶습니다.

여기에 이미지 설명을 입력하세요

마우스 오른쪽 버튼을 클릭하고 > 자세히 > "파일 확장자" 강조 표시 > "100"을 더 작은 값으로 변경하려는 경우 Windows 탐색기에서는 이를 허용하지 않습니다.

여기에 이미지 설명을 입력하세요

답변1

아직 Win11로 업그레이드하지 않았지만 폴더가 여전히 레지스트리 키 아래에 보기를 저장하는 경우: HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags

그런 다음 다음파워셸열을 표시하는 모든 저장된 보기에서 열 너비를 File Extension미리 설정된 너비( )로 축소합니다 .$NewWidthFile Extension

그런 다음 이들 중 하나를 관련 템플릿에 대한 사용자 정의 템플릿으로 설정할 수 있는 옵션이 있습니다.FolderType사용하여 Apply to Folders.

$NewWidth           = 0x35
$Bags               = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags'
$ExtPropKey         = [PSCustomObject]@{
                          'FmtID' = [GUID]'e4f10a3c-49e6-405d-8288-a23bd4eeaa6c'
                          'PID'   = 100
                      }
$PropKeyAsBytes     = $ExtPropKey.FmtID.ToByteArray() + [BitConverter]::GetBytes($ExtPropKey.PID)
$Encoder            = [System.Text.Encoding]::GetEncoding(28591)
$RegEx              = [Regex]$Encoder.GetString( $PropKeyAsBytes )

gci $Bags -Recurse |
    ? PSChildName -like '{*}' |
    ? Property -contains  'ColInfo' |
ForEach-Object{
    $ColInfoAsText   = $Encoder.GetString(( $ColInfoAsBytes = $_.GetValue('ColInfo') ))

    If ( ( $ColumnPresent = $RegEx.Match( $ColInfoAsText ) ).Success )
    {        
        $WidthOffset                  = $ColumnPresent.Index + 0x14
        $ColInfoAsBytes[$WidthOffset] = $NewWidth
        $Splat = @{
            'Path'    = $_.PSPath
            'Name'    = 'ColInfo'
            'Value'   = $ColInfoAsBytes
        }
        Set-ItemProperty @Splat
    }
}

관련 정보