Windowsコマンド(reg save)(その2)

前回使い方を覚えたreg saveを使ってみます。

PS C:\Users\takk\tmp> reg query hkcu\console | findstr HKEY
HKEY_CURRENT_USER\console
HKEY_CURRENT_USER\console\%SystemRoot%_system32_cmd.exe
HKEY_CURRENT_USER\console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe
HKEY_CURRENT_USER\console\%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe
HKEY_CURRENT_USER\console\C:_Program Files_WindowsApps_TheDebianProject.DebianGNULinux_1.1.6.0_x64__76v4gfsz19hv4_debian.exe
HKEY_CURRENT_USER\console\copy_git_bash
HKEY_CURRENT_USER\console\Git Bash
HKEY_CURRENT_USER\console\Git CMD (Deprecated)
PS C:\Users\takk\tmp>

上記からGit Bashをファイルへ保存してみます。

PS C:\Users\takk\tmp> reg save "hkcu\console\Git Bash" test.txt
エラー: クライアントは要求された特権を保有していません。
PS C:\Users\takk\tmp>

権限がないようです。

C:\Windows\system32>reg save "hkcu\console\Git Bash" tmp_Git_Bash.txt
この操作を正しく終了しました。

C:\Windows\system32>

管理者権限なら問題なくコピーできました。

C:\Windows\system32>type tmp_Git_Bash.txt
~省略~
C:\Windows\system32>

どうやらバイナリのようです。

16進ダンプしてみます。

C:\Windows\system32>wsl od -tx1 -Ax tmp_Git_Bash.txt
000000 72 65 67 66 01 00 00 00 01 00 00 00 26 7a ca 59
000010 96 0d d5 01 01 00 00 00 03 00 00 00 00 00 00 00
000020 01 00 00 00 20 00 00 00 00 10 00 00 01 00 00 00
000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
000070 ad 79 cf e0 d3 77 e9 11 a6 57 40 8d 5c 1e 45 82
*
000090 00 00 00 00 ae 79 cf e0 d3 77 e9 11 a6 57 40 8d
0000a0 5c 1e 45 82 72 6d 74 6d 00 00 00 00 00 00 00 00
0000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0001f0 00 00 00 00 00 00 00 00 00 00 00 00 15 28 2f ad
000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
001000 68 62 69 6e 00 00 00 00 00 10 00 00 00 00 00 00
001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001020 a8 ff ff ff 6e 6b 2c 00 21 d2 a5 19 26 d8 d4 01
001030 00 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00
001040 ff ff ff ff ff ff ff ff 04 00 00 00 f8 01 00 00
001050 78 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00
001060 14 00 00 00 1e 00 00 00 00 00 00 00 08 00 00 00
001070 47 69 74 20 42 61 73 68 38 ff ff ff 73 6b 00 00
001080 78 00 00 00 78 00 00 00 01 00 00 00 ac 00 00 00
001090 01 00 04 88 80 00 00 00 90 00 00 00 00 00 00 00
0010a0 14 00 00 00 02 00 6c 00 04 00 00 00 00 03 24 00
0010b0 3f 00 0f 00 01 05 00 00 00 00 00 05 15 00 00 00
0010c0 1a 1b 80 e6 b2 a1 a3 22 6c 33 ac c8 e9 03 00 00
0010d0 00 03 14 00 3f 00 0f 00 01 01 00 00 00 00 00 05
0010e0 12 00 00 00 00 03 18 00 3f 00 0f 00 01 02 00 00
0010f0 00 00 00 05 20 00 00 00 20 02 00 00 00 03 14 00
001100 19 00 02 00 01 01 00 00 00 00 00 05 0c 00 00 00
001110 01 02 00 00 00 00 00 05 20 00 00 00 20 02 00 00
001120 01 05 00 00 00 00 00 05 15 00 00 00 1a 1b 80 e6
001130 b2 a1 a3 22 6c 33 ac c8 e9 03 00 00 00 00 00 00
001140 e0 ff ff ff 76 6b 08 00 1e 00 00 00 60 01 00 00
001150 01 00 00 00 01 00 70 00 46 61 63 65 4e 61 6d 65
001160 d8 ff ff ff 4c 00 75 00 63 00 69 00 64 00 61 00
001170 20 00 43 00 6f 00 6e 00 73 00 6f 00 6c 00 65 00
001180 00 00 14 00 28 08 15 00 d8 ff ff ff 76 6b 0a 00
001190 04 00 00 80 36 00 00 00 04 00 00 00 01 00 32 00
0011a0 46 6f 6e 74 46 61 6d 69 6c 79 70 00 68 00 65 00
0011b0 e0 ff ff ff 76 6b 08 00 04 00 00 80 00 00 0e 00
0011c0 04 00 00 00 01 00 39 00 46 6f 6e 74 53 69 7a 65
0011d0 d8 ff ff ff 76 6b 0a 00 04 00 00 80 90 01 00 00
0011e0 04 00 00 00 01 00 32 00 46 6f 6e 74 57 65 69 67
0011f0 68 74 70 00 68 00 65 00 e8 ff ff ff 40 01 00 00
001200 88 01 00 00 b0 01 00 00 d0 01 00 00 00 00 00 00
001210 f0 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
002000

C:\Windows\system32>

結構な情報があるんですね。

コメント

タイトルとURLをコピーしました