CA Automation Suite for Data Centers - Configuration Automation, CA Client Automation - Asset Management, CA Client Automation - IT Client Manager, CA Client Automation, CA Client Automation - Remote Control, CA Client Automation - Asset Intelligence, CA Client Automation - Desktop Migration Manager, CA Client Automation - Patch Manager
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
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