Skip to content

Instantly share code, notes, and snippets.

@TylerLeonhardt
Created February 12, 2020 23:46
Show Gist options
  • Save TylerLeonhardt/7deb5f39877a48ebb41a2f9b208cce65 to your computer and use it in GitHub Desktop.
Save TylerLeonhardt/7deb5f39877a48ebb41a2f9b208cce65 to your computer and use it in GitHub Desktop.
Works by running `node repro.js` but doesn't work in a VS Code extension
const spawn = require("child_process").spawn;
const msi = spawn("msiexec", ["/i", "C:\\Users\\tyleonha\\Downloads\\PowerShell-7.0.0-rc.2-win-x64.msi"], {
detached: true,
stdio: "ignore",
shell: false,
windowsHide: true,
});
msi.unref();
msi.on("close", (code) => {
console.log("we done");
});
@deepak1556
Copy link

I looked into this briefly, the issue doesn't repro with electron, I have to check how extension host is spawned which will answer the question.

@TylerLeonhardt
Copy link
Author

Thanks for the info @deepak1556. Let me know if I can help test anything for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment