Sign in to follow this  
Followers 0
ricky

Service and windows 7

8 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



What account are you running the service under?

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks tripredacus for the link, very interesting...

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

Share this post


Link to post
Share on other sites

@Prodigy ; Could you share the entire code of the watching of the program please ?

Share this post


Link to post
Share on other sites

@Prodigy ; Could you share the entire code of the watching of the program please ?

Ha! The user is Ricky03! Its funny I know, since I get called "K-Mart" every now and then. muttley

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0