Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

vbscript to use apm variable?

$
0
0

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


Viewing all articles
Browse latest Browse all 9937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>