This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

vbscript to use apm variable?

Hello, how or which variable do I use in a vbscript to specify the hostname of the server to be tested on? I have the APM template built up and works great except I don’t want to hardcode the hostnames in the script, rather have the assigned server be used by strComputerName

Set wshNetwork = WScript.CreateObject( "WScript.Network" )

strComputerName = "{Hostname}"

Set objRegEx = New RegExp

objRegEx.Global = True

objRegEx.Pattern = "DELIVERED"

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.OpenTextFile("\\" & strComputerName & "\d$\Program Files\Research In Motion\Blackberry Enterprise Server\Logs\" & x & "\BESSRV01_MDAT_01_" & x & "_0001.txt", ForReading)

strSearchString = objFile.ReadAll

objFile.Closed