From c87d92c3b4a9955010ea1096886eb2706f8144f0 Mon Sep 17 00:00:00 2001 From: ymich9963 <79522843+ymich9963@users.noreply.github.com> Date: Sun, 30 Nov 2025 05:11:43 +0000 Subject: [PATCH] fix(ui.open): use "start" instead of deprecated "rundll32" #36731 Problem: The rundll32 utility is a leftover from Windows 95, and it has been deprecated since at least Windows Vista. Solution: Use the start command through Command Prompt instead. --- runtime/lua/vim/ui.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index a3f1a7a3ad..abcf7f8ba0 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -169,11 +169,7 @@ function M.open(path, opt) elseif vim.fn.has('mac') == 1 then cmd = { 'open', path } elseif vim.fn.has('win32') == 1 then - if vim.fn.executable('rundll32') == 1 then - cmd = { 'rundll32', 'url.dll,FileProtocolHandler', path } - else - return nil, 'vim.ui.open: rundll32 not found' - end + cmd = { 'cmd.exe', '/c', 'start', '', path } elseif vim.fn.executable('xdg-open') == 1 then cmd = { 'xdg-open', path } job_opt.stdout = false