diff --git a/src/config.ts b/src/config.ts index d26d00c2..8b72b1be 100644 --- a/src/config.ts +++ b/src/config.ts @@ -254,8 +254,10 @@ const DEFAULTS = o({ browser: "firefox", nativeinstallcmd: "curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash", - win_nativeinstallcmd: + win_powershell_nativeinstallcmd: "Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/gsbabil/tridactyl/master/native/win_install.ps1'))", + win_cmdexe_nativeinstallcmd: + '@"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(\'https://raw.githubusercontent.com/gsbabil/tridactyl/master/native/win_install.ps1\'))"', profiledir: "auto", // Container settings diff --git a/src/excmds.ts b/src/excmds.ts index 0b883103..66632c73 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -308,9 +308,9 @@ export async function native() { //#background export async function installnative() { if ((await browser.runtime.getPlatformInfo()).os === "win") { - const installstr = await config.get("win_nativeinstallcmd") + const installstr = await config.get("win_powershell_nativeinstallcmd") await clipboard("yank", installstr) - fillcmdline("# Installation command copied to clipboard. Please paste and run it in Powershell to install the native messenger.") + fillcmdline("# Installation command copied to clipboard. Please paste and run it in Windows Powershell to install the native messenger.") } else { const installstr = await config.get("nativeinstallcmd") await clipboard("yank", installstr) @@ -359,7 +359,7 @@ export async function updatenative(interactive = true) { return } if ((await browser.runtime.getPlatformInfo()).os === "win") { - await Native.run(await config.get("win_nativeinstallcmd")) + await Native.run(await config.get("win_cmdexe_nativeinstallcmd")) } else { await Native.run(await config.get("nativeinstallcmd")) }