diff --git a/include/vcpkg/vcpkgpaths.h b/include/vcpkg/vcpkgpaths.h
index 90fd4d09..ebc6342b 100644
--- a/include/vcpkg/vcpkgpaths.h
+++ b/include/vcpkg/vcpkgpaths.h
@@ -28,6 +28,8 @@
 
 namespace vcpkg
 {
+    Path exported_determine_root(const ReadOnlyFilesystem& fs, const Path& original_cwd, const VcpkgCmdArguments& args);
+
     struct ToolsetArchOption
     {
         ZStringView name;
diff --git a/src/vcpkg.cpp b/src/vcpkg.cpp
index 2b62cb55..d7b8ead5 100644
--- a/src/vcpkg.cpp
+++ b/src/vcpkg.cpp
@@ -296,7 +296,8 @@ int main(const int argc, const char* const* const argv)
         Debug::println("To include the environment variables in debug output, pass --debug-env");
     }
     args.check_feature_flag_consistency();
-    const auto current_exe_path = get_exe_path_of_current_process();
+    const auto current_exe_path =
+        exported_determine_root(real_filesystem, real_filesystem.current_path(VCPKG_LINE_INFO), args) / "vcpkg";
 
     bool to_enable_metrics = true;
     {
diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp
index 77e107f5..132050ba 100644
--- a/src/vcpkg/vcpkgpaths.cpp
+++ b/src/vcpkg/vcpkgpaths.cpp
@@ -518,6 +518,11 @@ namespace
 
 namespace vcpkg
 {
+    Path exported_determine_root(const ReadOnlyFilesystem& fs, const Path& original_cwd, const VcpkgCmdArguments& args)
+    {
+        return determine_root(fs, original_cwd, args);
+    }
+
     Path InstalledPaths::listfile_path(const BinaryParagraph& pgh) const
     {
         return this->vcpkg_dir_info() / (pgh.fullstem() + ".list");
