1 diff --git a/include/vcpkg/vcpkgpaths.h b/include/vcpkg/vcpkgpaths.h
2 index 90fd4d09..ebc6342b 100644
3 --- a/include/vcpkg/vcpkgpaths.h
4 +++ b/include/vcpkg/vcpkgpaths.h
9 + Path exported_determine_root(const ReadOnlyFilesystem& fs, const Path& original_cwd, const VcpkgCmdArguments& args);
11 struct ToolsetArchOption
14 diff --git a/src/vcpkg.cpp b/src/vcpkg.cpp
15 index 2b62cb55..d7b8ead5 100644
18 @@ -296,7 +296,8 @@ int main(const int argc, const char* const* const argv)
19 Debug::println("To include the environment variables in debug output, pass --debug-env");
21 args.check_feature_flag_consistency();
22 - const auto current_exe_path = get_exe_path_of_current_process();
23 + const auto current_exe_path =
24 + exported_determine_root(real_filesystem, real_filesystem.current_path(VCPKG_LINE_INFO), args) / "vcpkg";
26 bool to_enable_metrics = true;
28 diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp
29 index 77e107f5..132050ba 100644
30 --- a/src/vcpkg/vcpkgpaths.cpp
31 +++ b/src/vcpkg/vcpkgpaths.cpp
32 @@ -518,6 +518,11 @@ namespace
36 + Path exported_determine_root(const ReadOnlyFilesystem& fs, const Path& original_cwd, const VcpkgCmdArguments& args)
38 + return determine_root(fs, original_cwd, args);
41 Path InstalledPaths::listfile_path(const BinaryParagraph& pgh) const
43 return this->vcpkg_dir_info() / (pgh.fullstem() + ".list");