beautypg.com

Scripting with visual basic (vb) script – FUJITSU INTEGRATED REMOTE MANAGEMENT CONTROLLER IRMC S2/S3 User Manual

Page 422

background image

422

iRMC

S2/S3

Configuring the iRMC S2/S3 via SCCI and scripted configuration

12.2.2.3 Scripting with Visual Basic (VB) Script

The following VB script sends a configuration file to the iRMC S2/S3:

IP_ADDRESS = ""
USER_NAME = "admin"
PASSWORD = "admin"

FILE_NAME = ".\\ConfigFile.pre"

Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(FILE_NAME, ForReading)

' --------------------------------------------------------------
On Error Resume Next

Set xmlHttp = CreateObject("Microsoft.XMLHTTP")
xmlHttp.Open "POST", "http://" & IP_ADDRESS & "/config", False,
USER_NAME, PASSWORD
xmlhttp.setRequestHeader "Content-Type", "application/x-www-
form-urlencoded"
xmlHttp.Send objFile.ReadAll

Wscript.Echo xmlhttp.responsexml.xml