Announcement

Collapse
No announcement yet.

AMS application as Windows service

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AMS application as Windows service

    Hi all,

    I've made a great backup tool that runs in the background. Currently it starts minimized in the tray. But i want to make it a service. and i want to know if this is possible. The tool has a timer that triggers backups. those backups copy and zip files. the progress is currently shown in a window with a multiline read only input. So basicly. when setup the application will work automaticly.

    But what if i run it as a service. Does the application work if the application starts before anyone logs in on the computer? What happens to an app that starts before a user logs in. It simply doesn't spawn its window?

  • #2
    Executables created with AutoPlay Media Studio are desktop applications, not Windows services. Windows service executables have a different internal structure, as they need to respond to start and stop requests, among other differences.

    You can run common executables as Windows services via the srvany helper application. However, services do not directly interact with the desktop, for showing messages or popups - this is normally achived via interprocess comunication: one application running under the logged user account is communicating with the service, and shows any relevant dialogs. If the service itself attempts to display a message or dialog, the Interactive Services Detection will be invoked, which is something you don't want to happen.

    From your description, you should simply run the application at startup, which can be done by creating a shortcut in the Start menu, manually or as administrator with
    Code:
    Shell.CreateShortcut(Shell.GetFolder(SHF_STARTUP_COMMON), ...)
    Ulrich

    Comment


    • #3
      Thank you for your answer

      Ok, and what about AMS function: Service.Create()? Can't i just use that?

      Comment

      Working...
      X