Jump to content

Service and windows 7


Recommended Posts

Hello,

I create a watchdog to survey a software. The goal of this software is to check each x seconds if a software is started, if not, the service restarts it.

The line o install the service :

_Service_Create($sServiceName, $sDisplayName, $SERVICE_WIN32_OWN_PROCESS + $SERVICE_INTERACTIVE_PROCESS, $SERVICE_AUTO_START, $SERVICE_ERROR_NORMAL, '"' & @ScriptFullPath & '"')

The line to execute the file :

$taskArray[7][1] = ShellExecute(GetPath($taskArray[4][1], 1), $taskArray[5][1], GetPath($taskArray[4][1]), "open")

Why I have the window below and my program is not open as normal?

post-39014-0-01869000-1340894934_thumb.p

Thanks for your help

Edited by ricky03
Link to comment
Share on other sites

i test with the system user with interaction with the desktop and the current admin user. with the system I have the problem explained before and with the user, noting append!?!?!?

Edited by ricky03
Link to comment
Share on other sites

For information, the same service works without problem in WindowsXP!

Of course! In XP, your user account ran in session 0, but session 0 became isolated in Vista and higher. So while you can use a tool like psexec to launch a service or application in Session 0, I do not know a way to do it with AutoIT.

You can read about Session 0 Isolation here:

http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...