View previous topic :: View next topic |
Author |
Message |
larswars
Joined: 25 Jan 2005 Posts: 3
|
Posted: Tue Jan 25, 2005 6:10 am Post subject: script dont work in service mode |
|
|
I've running hostmonitor in service mode on win2003 server.
In normal mode the test and the script works fine.
But in service mode the test stop and reply "Error: unable to start script"
When I switch in normal mode the test start run whithout error.
The script: " WScript.stdout.write "scriptres:OK:"&" TESTTEST " "
I use the test "Shell Script" to start the script.
Any ideas? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12798 Location: USA
|
Posted: Tue Jan 25, 2005 1:57 pm Post subject: |
|
|
What account you have specified on Service page in the Options dialog (HostMonitor's Options dialog)? "Local system"?
Quote from the manual Quote: | Log on as
Specify user account (login and password) to impersonate the security context of the user.
When HostMonitor starts as a service, it uses the system account (as all interactive services). But this account may not have all the necessary permissions, so some tests will not work correctly (UNC test, "disk free space" test for shared drives, "CPU Usage" test for remote machines, etc). If you need these tests, you will need to assign a special user account. In this case HostMonitor will impersonate the security context of the user.
Note: Do not change the account using the system utility "Services". If you do so, HostMonitor will not be able to interact with the desktop. |
Regards
Alex |
|
Back to top |
|
|
larswars
Joined: 25 Jan 2005 Posts: 3
|
Posted: Wed Jan 26, 2005 5:14 am Post subject: |
|
|
No, the service use a Domain user account special for this service.
This account is in the group "local admin" and have the permissions to check the other Server in the Domain.
We use the tests "disk free space" and "CPU Usage" without problems. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12798 Location: USA
|
Posted: Wed Jan 26, 2005 5:53 pm Post subject: |
|
|
What command do you use to lauch script? cmd /c cscript /B /E:VBScript %Script% %Params%?
Could you try to specify full patch to cmd and cscript modules (in case environ variable does not contain path...)?
Regards
Alex |
|
Back to top |
|
|
larswars
Joined: 25 Jan 2005 Posts: 3
|
Posted: Thu Jan 27, 2005 3:06 am Post subject: |
|
|
Good idea, I try this command to launch script:
"C:\WINDOWS\system32\cmd.exe /c C:\WINDOWS\system32\cscript /B /E:VBScript %Script% %Params%"
I’m so sorry to tell you that the script still doesn’t start in service mode.
Regards
Lars |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12798 Location: USA
|
Posted: Thu Jan 27, 2005 9:27 pm Post subject: |
|
|
I cannot reproduce this error on our Win 2003 server Scripts works fine in application and service modes.
Could you try to execute the same command line (cmd /c cscript /B /E:VBScript anything_here) using "Execute external program" action? You may assign action to some simple test with predefined result (e.g. "good" action for "ping 127.0.0.1" test).
In this case HostMonitor will request Windows and record text information about reason of the error into syslog.htm file (or some other file specified on Advanced Logs page in the Options dialog).
Regards
Alex |
|
Back to top |
|
|
|