Rem $Header: $ Rem Copyright (c) CODE Consulting and Development, s.r.o., Plzen. All rights reserved. Rem#region Example Rem This example demonstrates how to set the application name for the client certificate. Option Explicit ' The configuration object allows access to static behavior. Dim ClientConfiguration: Set ClientConfiguration = CreateObject("OpcLabs.EasyOpc.UA.EasyUAClientConfiguration") WScript.ConnectObject ClientConfiguration, "ClientConfiguration_" ' Set the application name, which determins the subject of the client certificate. ' Note that this only works once in each host process. ClientConfiguration.SharedParameters.EngineParameters.ApplicationName = "QuickOPC - VBScript example application" ' Do something - invoke an OPC read, to trigger some loggable entries. Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.UA.EasyUAClient") Dim value: value = Client.ReadValue("http://opcua.demo-this.com:51211/UA/SampleServer", "nsu=http://test.org/UA/Data/;i=10853") ' The certificate will be located or created in a directory similar to: ' C:\Users\All Users\OPC Foundation\CertificateStores\UA Applications\certs\ ' and its subject will be as given by the application name. WScript.Echo "Processing log entry events for 10 seconds..." WScript.Sleep 10*1000 ' Event handler for the LogEntry event. ' Print the loggable entry containing client certificate parameters. Sub ClientConfiguration_LogEntry(Sender, e) If e.EventId = 151 Then WScript.Echo e End Sub Rem#endregion Example