Test does not run as service and when the computer is locked

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
PanTau64
Posts: 10
Joined: Tue Jun 07, 2005 1:56 am

Test does not run as service and when the computer is locked

Post by PanTau64 »

Hi,

I wrote a script which runs, when a good status action will be started. this script copies a file from another location and starts a external program. After the program is finished, a "StartMonitor" command is executed. Now the problem: When I trigger the test to be refreshed in the HostMonitor application, everything runs fine, also if the application is on top and the computer is not locked. All steps will be proceeded successfully, but when HostMonitor runs in service mode and the computer is locked, nothing happens. All other actions like sending an email depending on a bad status, are working fine. Only the start of the script fails:

SetCurrentFolder %FullPath%
ExecuteProgram 0 %udv_copy_log% "%udv_transfrm_src%%CommentLine31%" %udv_transfrm_dest%

StartMonitor

ExecuteProgram 0 %udv_scanlog% "%udv_transfrm_dest%%CommentLine31%" "%udv_scanlog_files%%CommentLine32%" %TestID% "%LastTestTime%"

StartMonitor

any idea?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1) It doesn't matter computer is locked or not. What is matter - what account do you use to start service. I assume script works when you start HostMonitor as application under your own account. Then you log off and Windows terminates application. HostMonitor that is started as service works under different account and probably does not have rights to access some folders.
Could you check what account you have specified on Service page in the Options dialog?

2) Truth to say I do not understand why do you use SetCurrentFolder and StartMonitor command in this script.

Regards
Alex
PanTau64
Posts: 10
Joined: Tue Jun 07, 2005 1:56 am

Post by PanTau64 »

Hi Alex,

I have entered the settings for the account to use in the options dialog, so it should use the right account. The SetCurrendFolder command is not needed (i's the rest from a copied script), but the StartMonitor command should be used if you start an external program (according your documentation).

"Executes external program, waits until external program is terminated, and continues to execute the script. If parameter <TimeToWait> is not equal to 0, HostMonitor will "kill" the external application when the application is not finished within the given timeout (time defined in milliseconds).
Be careful with this command, HostMonitor stops monitoring when executes external program by this command. "


cheers Olaf[/i]
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Be careful with this command, HostMonitor stops monitoring when executes external program by this command.
In this sentense "stops" means "suspends". HostMonitor authomatically resumes monitoring after executing external program.
I have entered the settings for the account to use in the options dialog, so it should use the right account.
Could you check NT Event Log? There should be message like
- Logged on as user ...
or
- Cannot logon as user ...

Regards
Alex
PanTau64
Posts: 10
Joined: Tue Jun 07, 2005 1:56 am

Post by PanTau64 »

Hi Alex,

I have checked the Event Log (Application) and found the following errors. The first one was posted for every test (approx. 16 times) which started the external program.

The description for Event ID ( 0 ) in Source ( hostmon.exe ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Unable to write to hostmon.INI.

Windows cannot do loopback processing when the computer is joined to a downlevel domain or is a member of a workgroup. Loopback processing will be disabled.

CN=Pitt\, Brad (010-Extern),OU=Users,OU=AAA-BBB,OU=AAA,OU=E010,DC=My,DC=World,DC=net from a different forest logged onto this machine. Cross Forest Group Policy processing is disabled and loopback processing has been enforced in this forest for this user account.

Regards

Olaf
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Unable to write to hostmon.INI
Could you check and disable "read-only" flag for hostmon.ini file?
If there are no such flag, could you check permissions to HostMonitor directory?
Windows cannot do loopback processing when the computer is joined to a downlevel domain or is a member of a workgroup. Loopback processing will be disabled.
...
net from a different forest logged onto this machine.
I have never seen such errors. Microsoft does. I hope following articles will be useful:
http://support.microsoft.com/default.as ... -us;231287
http://www.microsoft.com/technet/prodte ... b2335.mspx
http://support.microsoft.com/default.as ... -us;823862

Regards
Alex
Post Reply