'VS Code API: How do I open up another desktop app?

I'm using VS Code's API and I want Slack to open when a user clicks a button which I have already built.

The best thing that I've come up with until the moment is to simply point the button to https://app.slack.com/, but I doubt that's the best I can do.

I'm searching through the docs and thought that maybe built-in commands could help me, but haven't found a useful example.

I'm also trying to do a simple window.open() on my TypeScript file with no sucess.

EDIT:

I tried window.open("slack://open"); and got:

Blocked opening 'slack://open' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

If I try vscode.open("slack://open"); I get

Property 'open' does not exist on type 'typeof import("vscode")'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source