Reputation: 131
We have developed a Universal Windows App mainly focusing for Desktops. We are able to install and run the app without any issue.
Now our client is asking for Auto Startup facility, whenever the machine is started or restarted, the app should run automatically.
We have found a solution to start the same via batch file.
Now we like to know, how to copy-paste the batch file in startup folder via deployment package.
Can you please suggest a solution for achieving the same?
Upvotes: 1
Views: 129
Reputation: 16652
In the standard UWP app which need to be submitted to Windows Store, it is not possible to make it automatically started at startup, you can refer to the similar question here.
If your app is a sideload app which is not going to upload to the store, you can use VS2015TemplateBrokeredComponents to make Win32 APIs available in UWP app. To do this, you can refer to Brokered Windows Runtime Components for a side-loaded Windows Store app.
You can also refer to this answer:
There's a new WinRT API being introduced in RS1 called Windows.ApplicationModel.FullTrustProcessLauncher. It allows you to launch a full-trust application within the same package from a UWP app, see here. You may utilize this feature to create a schedule task to execute a powershell
For your scenario, you can use this feature to create a schedule task to execute your batch file.
Upvotes: 1