Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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

Posted

Thanks tripredacus for the link, very interesting...

I will check with psexec, but if somebody as an autoit solution I will be interested...

  • 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
×
×
  • Create New...