I have a vb-script to get the actual os.caption and servicepack like: "Microsoft Windows XP Professional 5.1.2600 Servicepack: 1"
to get a Warning in HM if BuildNumber and/or Servicepack changes i use the expression (%LastReply% <> %Reply%) doesnt work - "Unknown Operator - if i use ("%LastReply%" <> "%Reply%") i get an Invalid Expression too.
What´s going wrong !?
Problem with Reply and LastReply
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Could you provide more information, please?
- What version of HostMonitor do you use?
- What Windows do you use? Service Pack?
- Is HostMonitor started as a service or as an application?
- What exact test method do you use to start VB script? "Active Script"? "Schell Script"?
- May I see the test settings? You may export test settings into text file using menu File -> Export into text file.
Regards,
Max
- What version of HostMonitor do you use?
- What Windows do you use? Service Pack?
- Is HostMonitor started as a service or as an application?
- What exact test method do you use to start VB script? "Active Script"? "Schell Script"?
- May I see the test settings? You may export test settings into text file using menu File -> Export into text file.
Regards,
Max
[quote="KS-Soft Europe"]Could you provide more information, please?
- What version of HostMonitor do you use?
- What Windows do you use? Service Pack?
- Is HostMonitor started as a service or as an application?
- What exact test method do you use to start VB script? "Active Script"? "Schell Script"?
- May I see the test settings? You may export test settings into text file using menu File -> Export into text file.
Regards,
Max[/quote]
- Version of HM is 7.50
- Windows is Windows XP Professional Servicepack 1
- HM ist started as service
- the test method is "Active Script"
- the test setting follows:
[code];-----------------------------------------------------------------------------
;- HostMonitor`s export/import file -
;- Generated by HostMonitor at 2008/11/03 18:57:51 -
;- Source file: C:\Programme\HostMonitor7\Stroeer Platin Performance.hml -
;- Generation mode: Selected_Tests -
;-----------------------------------------------------------------------------
; ------- Test #01 -------
Method = Script
;--- Common properties ---
;DestFolder = Antwortzeiten optimieren Platin\Koeln\87rbh1j (Jobserver Platin)\Ebene3 (Hardware)\System\
Title = 87rbh1j: OSInfo
Comment = VBScript: OSInfo.vbs^M87rbh1j
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 600
Alerts =
ReverseAlert= No
UnknownIsBad= Yes
WarningIsBad= Yes
UseWarning = Yes
WarningExpr = ("%LastReply% <> %Reply%")
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = 87rbh1j: Ping 192.168.5.80 32 Byte
;--- Test specific properties ---
ExternalFile= C:\Programme\HostMonitor7\Scripts\OSInfo.vbs
Language = VBScript
Timeout = 10000
AllowUI = No
UseMacros = Yes
;-----------------------------------------------------------------------------
; Exported 1 items
[/code]
- What version of HostMonitor do you use?
- What Windows do you use? Service Pack?
- Is HostMonitor started as a service or as an application?
- What exact test method do you use to start VB script? "Active Script"? "Schell Script"?
- May I see the test settings? You may export test settings into text file using menu File -> Export into text file.
Regards,
Max[/quote]
- Version of HM is 7.50
- Windows is Windows XP Professional Servicepack 1
- HM ist started as service
- the test method is "Active Script"
- the test setting follows:
[code];-----------------------------------------------------------------------------
;- HostMonitor`s export/import file -
;- Generated by HostMonitor at 2008/11/03 18:57:51 -
;- Source file: C:\Programme\HostMonitor7\Stroeer Platin Performance.hml -
;- Generation mode: Selected_Tests -
;-----------------------------------------------------------------------------
; ------- Test #01 -------
Method = Script
;--- Common properties ---
;DestFolder = Antwortzeiten optimieren Platin\Koeln\87rbh1j (Jobserver Platin)\Ebene3 (Hardware)\System\
Title = 87rbh1j: OSInfo
Comment = VBScript: OSInfo.vbs^M87rbh1j
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 600
Alerts =
ReverseAlert= No
UnknownIsBad= Yes
WarningIsBad= Yes
UseWarning = Yes
WarningExpr = ("%LastReply% <> %Reply%")
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = 87rbh1j: Ping 192.168.5.80 32 Byte
;--- Test specific properties ---
ExternalFile= C:\Programme\HostMonitor7\Scripts\OSInfo.vbs
Language = VBScript
Timeout = 10000
AllowUI = No
UseMacros = Yes
;-----------------------------------------------------------------------------
; Exported 1 items
[/code]
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
We recommend to upgrade your system to Service Pack 3 or, at least, service pack 2.Hippo wrote:- Windows is Windows XP Professional Servicepack 1
You should useHippo wrote:WarningExpr = ("%LastReply% <> %Reply%")
Code: Select all
('%SuggestedReply%'=='%LastReply%')
Code: Select all
("%SuggestedReply%"=="%LastReply%")
Regards,
Max
[quote="KS-Soft Europe"][quote="Hippo"]- Windows is Windows XP Professional Servicepack 1[/quote] We recommend to upgrade your system to Service Pack 3 or, at least, service pack 2.
[quote="Hippo"]WarningExpr = ("%LastReply% <> %Reply%")[/quote] You should use [code]('%SuggestedReply%'=='%LastReply%')[/code] or [code]("%SuggestedReply%"=="%LastReply%")[/code] expression.
Regards,
Max[/quote]
Thank you Max !
The expressionwith single quotes works right - the doublequotes not.
Best Reguard
Hippo
[quote="Hippo"]WarningExpr = ("%LastReply% <> %Reply%")[/quote] You should use [code]('%SuggestedReply%'=='%LastReply%')[/code] or [code]("%SuggestedReply%"=="%LastReply%")[/code] expression.
Regards,
Max[/quote]
Thank you Max !
The expressionwith single quotes works right - the doublequotes not.
Best Reguard
Hippo
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Glad to hear that!Hippo wrote:The expressionwith single quotes works right

Hm. Probably, "Reply" contains quotation marks inside... Ok, we will check the code in order to protect special characters.Hippo wrote:- the doublequotes not.
Thank you for your feedback.
Regards,
Max
P.S. It was my fault, you obviously should use "<>" instead of "==" in your expression.