Start HeidiSQL Microsoft Store version via CLI with arguments

Morgy's profile image Morgy posted 3 years ago in General Permalink

Hello,

over here github[dot]com/drud/ddev/issues/3340 we're trying to open the Microsoft Store version of HeidiSQL via CLI (from WSL).

I already found a command that is at least capable of starting the application, but it does not work to pass arguments like with the "normal" exe.

start shell:appsfolder\2691AnsgarBeckerSoftwareD.19284136982C_peg9cky9b9hfj!HeidiSQL --host=127.0.0.1 --and-so-on

Does that work? If yes, how?

ansgar's profile image ansgar posted 3 years ago Permalink

CLI parameters should work similar to the normal version. Here's the list of supported arguments: https://www.heidisql.com/help.php#commandline

Not sure why you try to do that from WSL. And I don't see the path to the exe name in your example.

Morgy's profile image Morgy posted 3 years ago Permalink

Hello,

thanks for the reply!

Sadly, it does not work to just point to the .exe because you only get "permission denied". For example: Start-Process 'C:\Program Files\WindowsApps\2691AnsgarBeckerSoftwareD.19284136982C_11.3.1.0_x86__peg9cky9b9hfj\heidisql.exe'

That's why I came up with the shell:appsfolder command, but sadly it doesn't accept arguments.

The reason it's needed to start from CLI is because we want to connect to the local dev environment db server right away. (e.g. ddev heidisql)

The original command would be something like: '/c/Program Files/HeidiSQL/heidisql.exe' "--host=127.0.0.1 --port=${DDEV_HOST_DB_PORT} --user=root --password=root --description=${DDEV_SITENAME}" & (which of course does work if HeidiSQL is installed via the installer, but not if installed via Microsoft Store)

I'll probably have to ask somewhere at Microsoft if there's a way to start Microsoft Store apps from cli with arguments if you don't know a way for it.

ansgar's profile image ansgar posted 3 years ago Permalink

Ignore the MS store version - it won't get further updates in the future. Either use the portable or the normal installer. Chocolatey is another alternative, although that package is not maintained by myself.

I will perhaps automate updates for Winget in the future: https://github.com/microsoft/winget-pkgs/tree/master/manifests/h/HeidiSQL/HeidiSQL

Morgy's profile image Morgy posted 3 years ago Permalink

All right, that might "solve" the problem with HeidiSQL, but we'd probably need a solution for that anyway.

With Windows 11 the Microsoft Store is expected to gain much more popularity with the inclusion of Win32 apps and so on. We'll see..

Winget is great, I'll use that one instead then.

Thanks for your awesome work by the way!

Please login to leave a reply, or register at first.