Forum Discussion
MSIX app execution alias from cannot be selected from Task Scheduler
- Apr 28, 2023
Found a workaround. Instead of configuring the task to execute the app directly like this:
%localappdata%\AppData\Local\Microsoft\WindowsApps\MyAppName.Exe
It can be 'proxied' through cmd.exe. And the task needs to be configured as 'Run only when user is logged on':
cmd /C "%localappdata%\AppData\Local\Microsoft\WindowsApps\MyAppName.Exe" Arg1
The problem with this is that it always opened the cmd window while running so it wasn't exactly running in the background. After trying several solution, the one that worked was to use nircmd (https://www.nirsoft.net/utils/nircmd.html), like this:
nircmd execmd "%localappdata%\Microsoft\WindowsApps\MyAppName.exe" Arg1
Found a workaround. Instead of configuring the task to execute the app directly like this:
%localappdata%\AppData\Local\Microsoft\WindowsApps\MyAppName.Exe
It can be 'proxied' through cmd.exe. And the task needs to be configured as 'Run only when user is logged on':
cmd /C "%localappdata%\AppData\Local\Microsoft\WindowsApps\MyAppName.Exe" Arg1
The problem with this is that it always opened the cmd window while running so it wasn't exactly running in the background. After trying several solution, the one that worked was to use nircmd (https://www.nirsoft.net/utils/nircmd.html), like this:
nircmd execmd "%localappdata%\Microsoft\WindowsApps\MyAppName.exe" Arg1