Trouble running Winbatch automation script as a Windows service

Posted on 2012-09-10
Last Modified: 2012-09-13
I wrote a automation script using Winbatch that executes another desktop application and interacts with some of the GUI controls.  I compiled the Winbatch script as an executable for distribution, both as an exe for running as a regular app and an exs for running as a service.  It is running in several different environments on a variety of versions of Windows from XP, Server 2003, 7 and Server 2008.  Some of the clients are running the exs as a Windows service and it is working just fine, but other clients that also want to run it as a service are having a problem where the automation script starts but it doesn't appear to do anything - the other application that it is supposed to execute and interact with never starts.  If running the exe not as a service on the same client it works just fine.  Any ideas about what might be causing this and a possible solution?
Question by:virant
    LVL 25

    Accepted Solution

    Do you know which OS's it fails on?

    Windows 7 / 2008 don't allow services to run in session 0 any more so it may be because they're interactive that is the problem.

    Author Comment

    Does that mean there is no way to run an automation script to control a user application as a service in Windows anymore?
    LVL 25

    Expert Comment

    Sorry - didn't get that in my mail for some reason. I think third party utilities such as firedaemon can but not the way we always used to, no.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    The viewer will learn how to dynamically set the form action using jQuery.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now