diff --git a/src/extensionsIntegrated/appUpdater/main.js b/src/extensionsIntegrated/appUpdater/main.js index a337a8b488..f2ea906989 100644 --- a/src/extensionsIntegrated/appUpdater/main.js +++ b/src/extensionsIntegrated/appUpdater/main.js @@ -345,6 +345,11 @@ define(function (require, exports, module) { window.__TAURI__.path.resolveResource("src-node/installer/launch-windows-installer.js") .then(async nodeSrcPath=>{ // this is not supposed to work in linux. + // Strip Windows UNC prefix (\\?\) that Tauri adds on Windows as + // Node 24 cannot load the entry script from \\?\ prefixed paths. + if(nodeSrcPath.startsWith('\\\\?\\')){ + nodeSrcPath = nodeSrcPath.slice(4); + } const argsArray = [nodeSrcPath, appdataDir]; const command = window.__TAURI__.shell.Command.sidecar('phnode', argsArray); command.on('close', data => { diff --git a/src/tauri-updater.html b/src/tauri-updater.html index c49ced62a4..5741226dba 100644 --- a/src/tauri-updater.html +++ b/src/tauri-updater.html @@ -64,6 +64,11 @@ window.__TAURI__.path.resolveResource("src-node/installer/download-file.js") .then(async nodeSrcPath=>{ // this is not supposed to work in linux. + // Strip Windows UNC prefix (\\?\) that Tauri adds on Windows as + // Node 24 cannot load the entry script from \\?\ prefixed paths. + if(nodeSrcPath.startsWith('\\\\?\\')){ + nodeSrcPath = nodeSrcPath.slice(4); + } const argsArray = [nodeSrcPath, argJson]; const command = window.__TAURI__.shell.Command.sidecar('phnode', argsArray); command.on('close', data => {