Search code examples
c#wpfuwpdesktop-bridgewindows-task-scheduler

Is it Possible to launch/Trigger an desktop bridged app(Win32) with/without command line parameter from windows task scheduler?


I have a WPF application which is converted to UWP using the desktop bridge, Now I need to call this app/exe from windows scheduler to do some stuff. Now my problem is getting access denied. If any app trying run from task scheduler getting this access denied error.enter image description here


Solution

  • I have identified a workaround to achieve this. My actual requirement was 'I need to trigger an action in my Desktop bridged UWP app from windows scheduler' unfortunately windows scheduler has not read/write access to the uwp apps folder
    enter image description here

    The workaround was I have packaged a simple exe along with my UWP app package during first launch of the app the packaged exe will be copied to outside uwp sandbox, from the windows schedule I will execute this copied 'exe' say sample.exe and sample .exe will send a custom windows message to my UWP app.