OK so you were right, the constant was missing.

This is the line of code I missed off:

code:
 
Dim SMSContext As New SWbemNamedValueSet
SMSContext.Add "LocaleID", "MS\1033"
SMSContext.Add "MachineName", "MyMachine"
SMSContext.Add "ApplicationName", "MyApp"

How would I create an array as SWbemNamedValueSet and add my own values?

Thanks in advance