locked
How do I install a windows service in an app?

    Question

  • 1. If it's not allowed / possible, what else am I supposed to do? The app happens to need a background running process that runs whether the user facing part is shown or not. (it does filesystem indexing)

    2. Also I would rather make the ui part in html, but I guess there is no access to c++/c# from js, so I could offer the c#/c++ stuff as a service but yet again I would need to install a service alongside my app.

    So I do actually need a background running process.

    Sunday, April 12, 2015 6:23 AM

All replies

  • Windows Store apps cannot install or communicate with Windows Services. If you need a service you will need to write a desktop app instead.

    Windows Store apps can launch background tasks to act in the background, but background tasks still run in the app's context and do not have full access to the file system. They probably aren't reasonable for file system indexing (depending on what exactly you mean by file system indexing).

    Windows Store apps in HTML can load Windows Runtime Components written in C++ and C#

    Sunday, April 12, 2015 7:14 AM
    Moderator

  • Am I allowed to point to another url where users have to download an .exe which would install my indexing service?

    I looked here but couldnt find an answer: https://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx

    EDIT: Ok seems like there are tons of weird restrictions, it doesnt seem to be allowed to communicate with the file system at all, maybe with /Documents or /Pictures but not normally

    https://msdn.microsoft.com/en-us/library/windows/apps/dn764944.aspx

    • Edited by Dreada Sunday, April 12, 2015 7:52 AM
    Sunday, April 12, 2015 7:32 AM
  • Your question appears to be addressed in section 3.1 in the App certification requirements.

    As I mentioned previously, Windows Store apps do not have direct general access to the file system. My guess is that you'll need to write a desktop app rather than a Windows Store app, but you haven't provided enough details about what you want the app to do to say for sure.

    Sunday, April 12, 2015 11:31 PM
    Moderator