CA Automation Suite for Data Centers - Configuration AutomationCA Client Automation - Asset ManagementCA Client Automation - IT Client ManagerCA Client AutomationCA Client Automation - Remote ControlCA Client Automation - Asset IntelligenceCA Client Automation - Desktop Migration ManagerCA Client Automation - Patch Manager
Issue/Introduction
Running a dms script to collect path information and write this to a .mif file works fine but when the .mif is read by asset management agent and written to .mnv all the backslashes "\" are removed
for example the follwing dms script collects the path of the variable sdroot and writes it to a .mif
The international standard for mif files means that special characters need to be escaped with a \. so if you need the path to display a single \ it needs to be \\ in the mif file.
The first \ escapes the special character allowing the second to display in the .mnv file.
We can add a function (here called DoubleSlash) to the DMS that will replace \ with \\.
This will escape the special character and allow the additional inventory to be correctly reported
Dim BaseSDPath as String Dim sMifFile AS String
FUNCTION DoubleSlash(sString AS STRING) AS STRING DIM i as integer DIM sBuf as STRING sBuf="" FOR i=1 TO Len(sString) sBuf=sBuf+Mid(sString,i,1) IF Mid(sString,i,1)="\" THEN sBuf=sBuf+"\" END IF NEXT i