KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

script dont work in service mode

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
larswars



Joined: 25 Jan 2005
Posts: 3

PostPosted: Tue Jan 25, 2005 6:10 am    Post subject: script dont work in service mode Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Jan 25, 2005 1:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
larswars



Joined: 25 Jan 2005
Posts: 3

PostPosted: Wed Jan 26, 2005 5:14 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Wed Jan 26, 2005 5:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
larswars



Joined: 25 Jan 2005
Posts: 3

PostPosted: Thu Jan 27, 2005 3:06 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Thu Jan 27, 2005 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index