Downloads and extract the Visual C++ Redistributables. · GitHub
これ。
要点は
-
dark.exe
という逆コンパイラでvc_redist.x64.exe
を展開する。 - 展開されたファイル群にcabファイルがあるので、解凍ソフトで展開する
とdllを入手できる。
GistではWindowsに標準で入っているexpand.exe
でcabファイルを展開しているが、普段使っている7-zipやWinRAR等でもcabファイルは扱えるはずなので、実質dark.exe
の入手だけでOK。
Gistのように最小構成で自動化したいときなどはexpand.exeでよいか。
今までDLLを取ろうとuniextractなどを使っても上手くいかなかったので悩んでいたが、逆コンパイルが必要だったとはわかりませんでした。
dark.exe
は怪しい名前ですけどWiXというフリーのソフトウェアツールで実際安全。
GitHubのリリースからバイナリを入手する。
Releases · wixtoolset/wix3 · GitHub
wix{バージョン}-binaries.zip
2019から再配布可能パッケージの2015 2017 2019 が統合されてひとつのパッケージになっている模様。
流れ
ダウンロード | IDE、Code、Team Foundation Server | Visual Studio
から
vc_redist.x64.exe
をダウンロード
Releases · wixtoolset/wix3 · GitHub
から
wix{バージョン}-binaries.zip
をダウンロード。
内部のdark.exe
を取り出す。
vc_redist.x64.exe
の展開ファイル出力先ディレクトリを作っておく。
cmdから
dark.exe -nologo -x {出力先ディレクトリ} vc_redist.x64.exe
を実行。
cabは
\AttachedContainer\packages\vcRuntimeAdditional_amd64
\AttachedContainer\packages\vcRuntimeMinimum_amd64
にそれぞれある。AdditionalにはMinimumのdllは含まれていないので、Minimumで足りなければAdditionalを解凍するように。
>dir /b
\AttachedContainer\packages\vcRuntim
eMinimum_amd64 のディレクトリ
api_ms_win_core_console_l1_1_0.dll
api_ms_win_core_datetime_l1_1_0.dll
api_ms_win_core_debug_l1_1_0.dll
api_ms_win_core_errorhandling_l1_1_0.dl
api_ms_win_core_file_l1_1_0.dll
api_ms_win_core_file_l1_2_0.dll
api_ms_win_core_file_l2_1_0.dll
api_ms_win_core_handle_l1_1_0.dll
api_ms_win_core_heap_l1_1_0.dll
api_ms_win_core_interlocked_l1_1_0.dll
api_ms_win_core_libraryloader_l1_1_0.dl
api_ms_win_core_localization_l1_2_0.dll
api_ms_win_core_memory_l1_1_0.dll
api_ms_win_core_namedpipe_l1_1_0.dll
api_ms_win_core_processenvironment_l1_1
api_ms_win_core_processthreads_l1_1_0.d
api_ms_win_core_processthreads_l1_1_1.d
api_ms_win_core_profile_l1_1_0.dll
api_ms_win_core_rtlsupport_l1_1_0.dll
api_ms_win_core_string_l1_1_0.dll
api_ms_win_core_synch_l1_1_0.dll
api_ms_win_core_synch_l1_2_0.dll
api_ms_win_core_sysinfo_l1_1_0.dll
api_ms_win_core_timezone_l1_1_0.dll
api_ms_win_core_util_l1_1_0.dll
api_ms_win_crt_conio_l1_1_0.dll
api_ms_win_crt_convert_l1_1_0.dll
api_ms_win_crt_environment_l1_1_0.dll
api_ms_win_crt_filesystem_l1_1_0.dll
api_ms_win_crt_heap_l1_1_0.dll
api_ms_win_crt_locale_l1_1_0.dll
api_ms_win_crt_math_l1_1_0.dll
api_ms_win_crt_multibyte_l1_1_0.dll
api_ms_win_crt_private_l1_1_0.dll
api_ms_win_crt_process_l1_1_0.dll
api_ms_win_crt_runtime_l1_1_0.dll
api_ms_win_crt_stdio_l1_1_0.dll
api_ms_win_crt_string_l1_1_0.dll
api_ms_win_crt_time_l1_1_0.dll
api_ms_win_crt_utility_l1_1_0.dll
cab1.cab
concrt140.dll
msvcp140.dll
msvcp140_1.dll
msvcp140_2.dll
ucrtbase.dll
vcamp140.dll
vccorlib140.dll
vcomp140.dll
vcruntime140.dll
vcruntime140_1.dll
vc_runtimeMinimum_x64.msi
>dir /b
\AttachedContainer\packages\vcRunti
eAdditional_amd64 のディレクトリ
cab1.cab
mfc140.dll
mfc140chs.dll
mfc140cht.dll
mfc140deu.dll
mfc140enu.dll
mfc140esn.dll
mfc140fra.dll
mfc140ita.dll
mfc140jpn.dll
mfc140kor.dll
mfc140rus.dll
mfc140u.dll
mfcm140.dll
mfcm140u.dll
vc_runtimeAdditional_x64.msi
参考
- Downloads and extract the Visual C++ Redistributables. · GitHub
- WiX - List of Tools
-
ダウンロード | IDE、Code、Team Foundation Server | Visual Studio
「その他のツールとフレームワーク」から「Visual Studio 2019 の Microsoft Visual C++ 再頒布可能パッケージ 」を - Microsoft Visual C++ ランタイムライブラリ 再頒布可能パッケージのまとめ 2019年版 2005~2019まで (Microsoft Visual C++ 2005、2008、2010、2012、2013、2015、2017、2019の各バージョンの最新版 MSVC Runtime librariesのまとめ)
- Expand - DOS コマンド一覧 - Programming Field
-
expand.exeとは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
デフォルトのcmdではパスが通ってなかったので外部ツールかと思いましたが私の環境でもありました。 - .cab【拡張子】とは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
-
WiX Toolset Qiita記事のまとめ - Qiita
今後みるかも - WiX - Wikipedia
- dark.exe (逆コンパイラ) の使い方 - WiX|freeml byGMO