question

morgy avatar image
0 Votes"
morgy asked RichMatheisen-8856 commented

Start Microsoft Store apps via CLI with arguments

Hello,

reference #1: https://github.com/drud/ddev/issues/3340
reference #2: https://www.heidisql.com/forum.php?t=38438

I am looking for a way to start Microsoft Store apps via CLI with arguments.

It does not work if you try to start the .exe like: Start-Process 'C:\Program Files\WindowsApps\2691AnsgarBeckerSoftwareD.19284136982C_11.3.1.0_x86__peg9cky9b9hfj\heidisql.exe' because you're only left with "permission denied".

I found this command to start apps: start shell:appsfolder\2691AnsgarBeckerSoftwareD.19284136982C_peg9cky9b9hfj!HeidiSQL
But that doesn't accept arguments like the original .exe does, because it then cannot find the file.

Any help?

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered RichMatheisen-8856 commented

Hello @morgy,

Thank you for your question and reaching out.

You are getting Access denied because C:\Program Files\WindowsApps\ is protected by Windows OS where all apps are resides.

If you want to get access then you need to get ownership of this folder from explorer then you can use it.

Below is similar threads how to gain access to this folder.

https://answers.microsoft.com/en-us/windows/forum/all/what-is-windows-apps-hidden-folder-and-why-cant-i/40a60508-c409-422a-af92-bd51fe5a4ca9

https://answers.microsoft.com/en-us/windows/forum/all/permissions-in-cprogram-files-windowsapps-have/1972767e-6316-4b67-b417-f37b248d7d9b




--If the reply is helpful, please Upvote and Accept as answer--

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So, there is no way to start an app via cli right away?
I mean the start command works well, but it doesn't accept arguments, or I just did not figure out how.

0 Votes 0 ·

The Start-Process cmdlet has an "-ArgumentList" parameter that takes an array of strings as a value.

0 Votes 0 ·