Continue
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Schneider Electric
Community
Community
Notifications
close
  • Categories
  • My Subscriptions
  • Forums
  • Knowledge Center
  • Blogs
  • Ideas
  • Events
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register

Contact Support

Close

Ask our Experts

Have a question related to our products, solutions or services? Get quick support on community Forums

Email Us

For Community platform-related support, please email us

New Community Ranking System
Our Community ranking system has recently been updated. You may notice changes in user rankings and receive system messages or notifications. If you have questions about how the new ranking works, please refer to the announcement post for more details (click here).

Adjustments for VBScript in Geo SCADA 2025 R2

Geo SCADA Knowledge Base

Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.

Search in

Improve your search experience:

  • Exact phrase → Use quotes " " (e.g., "error 404")
  • Wildcard → Use * for partial words (e.g., build*, *tion)
  • AND / OR → Combine keywords (e.g., login AND error, login OR sign‑in)
  • Keep it short → Use 2–3 relevant words , not full sentences
  • Filters → Narrow results by section (Knowledge Base, Users, Products)
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Geo SCADA Knowledge Base
  • Adjustments for VBScript in Geo SCADA 2025 R2
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Labels
Top Labels
  • Alphabetical
  • database 32
  • Web Server and Client 31
  • WebX 19
  • Request Form 18
  • Lists, Events & Alarms 16
  • ViewX 15
  • Application Programming 12
  • Setup 12
  • Telemetry 8
  • Events & Alarms 7
  • Lists 7
  • Mimic Graphics 7
  • Downloads 6
  • Security 5
  • Geo SCADA Expert 5
  • SCADA 5
  • IoT 5
  • Support 5
  • Drivers and Communications 4
  • DNP 3 3
  • IEC 61131-3 Logic 3
  • 2025 3
  • Geo Scada 2
  • Virtual ViewX 2
  • Python 2
  • Trends and Historian 2
  • Known Issues 1
  • Archive 1
  • Privacy Policy 1
  • OPC-UA 1
  • Updates 1
  • PI 1
  • Python API 1
  • Code 1
  • Driver Kit 1
  • Mobile 1
  • Maps and GIS 1
  • Releases 1
  • Templates and Instances 1
  • Architectures 1
  • Tools & Resources 1
  • AVEVA 1
  • ClearSCADA 1
  • Historian 1
  • Web 1
  • Upgrade 1
  • Previous
  • 1 of 5
  • Next
Latest Blog Posts
  • Using Script to set Value Map content
  • Writing Scripts using JavaScript
  • Adjustments for VBScript in Geo SCADA 2025 R2
  • Geo SCADA 2025 R2 Operating System Support
  • Geo SCADA 2025 R2 Known Issues

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
sbeadle
sbeadle Champion
Champion
‎2026-10-15 05:37 AM
0 Likes
0
521
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2026-10-15 05:37 AM

Adjustments for VBScript in Geo SCADA 2025 R2

Originally published on Geo SCADA Knowledge Base by sbeadle | October 15, 2026 02:37 PM

Home   Back

This is an evolving article and new items will be added periodically

 

Geo SCADA 2025 R2 includes a new scripting engine which is backwards-compatible to previously-written VBScript. Many scripts will run unchanged, but there are some minor differences in execution. Many of these issues are caused by minor errors or assumptions in existing code. This page contains a description of various issues and how to make small changes to address them in this newer version.

 

Many items also relate to JScript execution, and some issues specific to JScript are also mentioned in the last section.

 

VBScript Issues

 

1. [variable].Value is not a Method, it is a Property

We have seen script written incorrectly, which assumes that the SetValue and Value methods take arguments in order to write the value to the database item. For example, this is incorrect:

set x = Server.FindObject("Example Projects.New Float")
x.Interface.Value(3.14)

This code will not set the value to 3.14. The correct syntax for this is:

set x = Server.FindObject("Example Projects.New Float")
x.Interface.Value = 3.14

This is because the item property Value takes precedence over the identically named item method Value. Code written with this error in previous versions of Geo SCADA Expert would ignore the method arguments and not set the variable’s value. Code written with this error in this new version of Geo SCADA Expert will raise a script error like this:

sbeadle_0-1792060943664.png

To overcome this issue, you should correct the syntax accordingly.

 

2. Menu Method Return Values

Menu methods such as Menu.Init, Menu.AddItem, and Menu.Separator do not return values. In previous versions of Geo SCADA Expert, these methods returned empty strings. In this new version of Geo SCADA Expert, Null is returned, which might make code behave differently if you have used the return value.

There is no need to use the return value in these functions.

 

3. Form Control Default Properties

The objects returned by Form functions that add controls, such as Form.AddEditBox, no longer support default properties, however this can be easily rectified. For example, the following will now raise an error on the final line.

Form.Init( "Test")
Set field = Form.AddEditBox(2,2,10,1)
field.Value = "test"
MsgBox field

You can resolve this by adding .Value:

Form.Init( "Test")
Set field = Form.AddEditBox(2,2,10,1)
field.Value = "test"
MsgBox field.Value

 

4. Object Default Properties

A database object variable does not now support default properties. These have to be specified. For example, the following will not work:

Set obj = Server.LookupObject(rowId)
MsgBox CStr(obj) 'This will not show the object Id

Instead use Id specifically:

Set obj = Server.LookupObject(rowId)
MsgBox CStr(obj.Id)

 

5. Form Layout Issues

The appearance of forms is different in this version and form items are slightly larger. Consequently, the exact layout of text and entry items will have moved slightly.

sbeadle_1-1792061100069.png

It is unlikely that code changes will be needed for most forms but see the next item below.

 

6. Behavior Changes to Form.AddListBox

If a list box on a form contains no items, the box will display the message “No Items”.

 

The maximum number of rows visible using Form.AddListBox is now the same as the number requested in the third argument. Previously, the number of rows was only approximate and commonly had to be set to a higher number to allow the desired number on the form. For example, this code would previously display fewer rows instead of the requested 20. Now it will display 20 rows.

Set QueryList = Form.AddListBox(2, 5, 20, 1)

If your existing script code uses Form.AddListBox then you might need to alter this argument. A symptom of this issue could be that buttons or other Form items are placed on top of the list.

 

To resolve this, reduce the number of rows on display by changing the 3rd argument, for example from 20 to 12.

 

Note that the ListBox always scrolls horizontally when there are more rows available than will fit into the requested number of rows. 

 

7. Behavior Changes to Form.AddQuery

This is similar to AddListBox above.

 

If the SQL query returns no results, the list box will display the message “No Query Results”.

 

The maximum number of rows visible using Form.AddQuery is now the same as the number requested in the fourth argument. Previously, the number of rows was only approximate and commonly had to be set to a higher number to allow the desired number on the form. For example, this code would previously display fewer rows instead of the requested 20:

Set QueryList = Form.AddQuery(2, 5, 50, 20, "SELECT Name,TypeDesc FROM CMimic")

If your existing script code uses Form.AddQuery then you might need to alter this argument. A symptom of this issue could be buttons placed on top of the list:

sbeadle_2-1792061283025.png

To resolve this, reduce the number of rows on display by changing the 3rd argument, for example from 20 to 12.

8. New Clipboard Object

The new 64-bit ViewX will only permit the creation of 64-bit ActiveX objects so that existing use of the clipboard using CreateObject("InternetExplorer.Application") will not work. A new Clipboard object can be used directly. The following methods are available:

void Clipboard.Clear()
Boolean Clipboard.ContainsText()
string Clipboard.GetText()
void Clipboard.SetText(string)

For more information, see the ‘Clipboard Functions’ branch of topics in the Scripting Guide in the online help.

 

9. Server.LookupObject returns Nothing if the object is not found, not Null

The correct way to check whether LookupObject has found a valid Object ID is to use Is Nothing. A check for Null is incorrect. This behavior is unchanged, but some clarification is helpful here.

This code is correct:

Public Sub Test 
  Set obj = Server.LookupObject(99999999) 
  If obj Is Nothing Then 
    MsgBox "Not found" 
  Else 
    MsgBox CStr(obj.Id) 
  End If 
End Sub

 

10. Using .Net reserved words toString, GetType, Equals and GetHashCode

Using these words as variable names causes an error, unless the variable is first defined using Dim.

The error message is: "the object has no suitable property or field named 'toString'."

This code produces the error:

Public Sub Test 
  ToString = "Hello" 
  MsgBox ToString 
End Sub

This code does not:

Public Sub Test 
  Dim ToString 
  ToString = "Hello" 
  MsgBox ToString 
End Sub

These names will cause an error even if the case is different (tostring, equals, Gettype...). Ensure that Dim is used if you wish to use these variable names.

 

11. No implicit date/time to number conversions or vice versa

For example, when using SetRegistry to write a date, it was not necessary to convert that date to a number first. Now the conversion is needed. Example:

SetRegistry "start.date", CLng(Int(CDbl(StartTime.Value)))

In this example, the date is a Form field, and it is converted to a number with CDbl first. Then the fractional time is removed with Int and it is converted to a Long for registry storage.

When reading registry values, you need to use CDate to convert numbers back to dates.

 

12. You need to provide all pick action parameters or the script will not run.

Example code on a mimic:

Option Explicit

Public Sub DoNothing(One, Two)
 MsgBox "One"
End Sub

Create a script pick action pointing to DoNothing and only configure a parameter for the first parameter.

pickaction1.png

 

In Geo SCADA 2025 (87) the second function still executes ("One" is shown).

In Geo SCADA 2025 R2 (88) no script executes.

A future update will resolve this behavior and continue execution.

 

13. App.LogOn/Off and App.LogOnUser/OffUser and COM .LogOn will stop execution

For security reasons the Log On and Off operations in ViewX will cause script to stop, because the context of the script has been lost and Geo SCADA cannot assure that continuing to run the same script will retain the same level of access to mimic, libraries or objects.

 

This refers to the COM interface methods:

  • App.LogOn()
  • App.LogOff()
  • App.LogOnUser()
  • App.LogOffUser()

Also to COM automation of ViewX, with code such as:

public sub OpenViewX
	Set vx = CreateObject("Serck.ViewXApplication")
	vx.Logon "MyServer", "MyUser", "MyPassword"
	MsgBox "Logon OK"
end sub

The message box will not be shown because the Logon event will stop script execution.

 

14. The Server.GetOPCValue method cannot read aggregates

This is a temporary limitation.

For example, if "myPoint" is an output with Control enabled:

y = Server.GetOPCValue(myPoint & ".Control")
z = Server.GetOPCValue(myPoint & ".Control.ControlMaximum")

These will both return errors.

A future update will resolve this behavior. Error codes will differ, but will continue to be raised.

An alternative to GetOPCValue for such cases is to get the object reference:

sPtFullName = "Test.Point"
set pControl = Server.FindObject(sPtFullName)
on error resume next
z = pControl.Interface.Control.ControlMaximum
If Err.Number <> 0 Then
	MsgBox "Point does not have control features"
end if

 

15. Changes to checking an Aggregate, e.g. to test for Controls

In prior versions the following code could be used:

sPtFullName = "Test.Point"
set pControl = Server.FindObject(sPtFullName)
Set y = pControl.Interface.Control
If y is Nothing Then
    MsgBox "Has No Control"
Else
    MsgBox "Has Control"
End If

In 2025 R2, omit the 'Set' and check if the item is an object:

sPtFullName = "Test.Point"
set pControl = Server.FindObject(sPtFullName)
y = pControl.Interface.Control
If not IsObject(y) Then
    MsgBox "Has No Control"
Else
    MsgBox "Has Control"
End If

 

16. GetRegistry returns Null if there is no default

The GetRegistry function takes a name and the default value as parameters. If there is no default value and the registry does not contain the value then the function returns Null. In Geo SCADA 2025 R2, Null cannot be manipulated as a string.

In prior versions:

a = GetRegistry("newkey")
MsgBox a

This will display an empty Message Box.

In 2025 R2, the returned value needs to be tested for Null:

a = GetRegistry("newkey")
If IsNull(a) Then
  MsgBox ""
Else
  MsgBox a
End If

 

Specific JScript Issues

These issues are specific to JScript upgrades. Note that various items in the VBScript list will be relevant too, such as the Form behavior.

J1. JScript Execution Issues – Calling Script Functions via COM

Some users have deployed JScript which calls for the ActiveXObject("ScriptControl") COM object. We do not recommend this because it relies on Windows features which can be turned off for security reasons.

In some cases, it has been used to emulate the MsgBox feature of VBScript.

 

An alternative is to use the Form object in JScript. See a similar example which was created for JavaScript V8 in this release, available in the new demonstration database .sde in the folder "Symbol Library.~Config.Script.MsgBox for V8".

 

We recommend minimising or removing CreateObject and ActiveXObject if possible.

 

J2. JScript Execution Issues – Case Sensitivity

The newer JScript implementation is New JScript is stricter on case checking. Some examples of common case check errors are:

  • Using LookUpObject which should be LookupObject
  • Using Form.init, which should be Form.Init
  • Using <form field name>.value which should be <form field name>.Value
  • Using .checked for a form field which should be .Checked
  • Using .sql for a query animation which should be .Sql

Naturally there are other potential case errors, and these include keywords, methods and animation property names.

 

J3. JScript Execution Issues – Type Conversions

The newer JScript implementation requires specific types for Form controls and other items.

For example, a form button default setting requiring a Boolean argument for the Default property may have previously accepted the integer 1 but now requires true or false. Please change any incorrect items to Booleans, changing this incorrect line for a Form button:

ok.Default = 1;

to:

ok.Default = true;

 

J4. JScript Execution Issues – Functions with Arguments

Microsoft's current version of JScript, "JScript9Legacy" is used by default on Windows 11, version 24H2. This version does not allow parameters to be passed in a mimic pick action.

For example, this will fail:

function MyScript(test1) {
}

This code will not allow the parameter test1 to be used. Geo SCADA 2025 R2 ViewX will fail if this is attempted without the change below.

 

If parameters are required, then a registry setting can be used to force Windows 11 to use the previous JScript version.

 

Note that Microsoft have done this to Win 11 24H2 and other older versions to resolve a vulnerability:

https://msrc.microsoft.com/update-guide/en-us/vulnerability/CVE-2024-43584

 

As the only way to restore functionality is to restore the vulnerable JScript run time, reverting is at the customer's risk. To do this, add the following key to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main]
Value Name: JScriptReplacement
Value Type: REG_DWORD
Value Data: 0

We do not recommend using JScript with Geo SCADA Expert.

 

 


Go: Home  Back

 

Author

Biography

sbeadle

Link copied. Please paste this link to share this article on your social media post.

  • Back to Blog
  • Newer Article
  • Older Article
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support

    Ask our Experts

    Have a question related to our products, solutions or services? Get quick support on community Forums

    Email Us

    For Community platform-related support, please email us

Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2026 Schneider Electric

Welcome!

Welcome to your new personalized space.

of

Explore