Reading a text file

(imported topic written by jpeppers91)

I have a text file that should display output like this

Description HotFixID InstalledOn

Update 982861 11/30/2012

Update KB958830 10/26/2011

Update KB971033 10/26/2011

Security Update KB2425227 10/26/2011

Security Update KB2479943 10/26/2011

Update KB2484033 10/26/2011

Update KB2488113 10/26/2011

Security Update KB2491683 10/26/2011

Update KB2492386 10/26/2011

Security Update KB2503665 10/26/2011

Update KB2505438 10/26/2011

Update KB2506014 10/26/2011

Security Update KB2506212 10/26/2011

Update KB2506928 10/26/2011

Security Update KB2507618 10/26/2011

Security Update KB2508272 10/26/2011

Security Update KB2509553 10/26/2011

Security Update KB2510531 10/26/2011

Update KB2511250 10/26/2011

Security Update KB2511455 10/26/2011

Update KB2512715 10/26/2011

Update KB2515325 10/26/2011

Security Update KB2518869 10/26/2011

Update KB2522422 10/26/2011

Update KB2529073 10/26/2011

Security Update KB2532531 10/26/2011

but when I do lines of file it comes out unreadable

%ff%feD%00e%00s%00c%00r%00i%00p%00t%00i%00o%00n%00 %00 %00 %00 %00 %00 %00H%00o%00t%00F%00i%00x%00I%00D%00 %00 %00 %00I%00n%00s%00t%00a%00l%00l%00e%00d%00O%00n%00 %00 %00

%00

%00U%00p%00d%00a%00t%00e%00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %009%008%002%008%006%001%00 %00 %00 %00 %00 %001%001%00/%003%000%00/%002%000%001%002%00 %00 %00 %00

%00

%00U%00p%00d%00a%00t%00e%00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00K%00B%009%005%008%008%003%000%00 %00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

%00

%00U%00p%00d%00a%00t%00e%00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00K%00B%009%007%001%000%003%003%00 %00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

%00

%00S%00e%00c%00u%00r%00i%00t%00y%00 %00U%00p%00d%00a%00t%00e%00 %00 %00K%00B%002%004%002%005%002%002%007%00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

%00

%00S%00e%00c%00u%00r%00i%00t%00y%00 %00U%00p%00d%00a%00t%00e%00 %00 %00K%00B%002%004%007%009%009%004%003%00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

%00

%00U%00p%00d%00a%00t%00e%00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00K%00B%002%004%008%004%000%003%003%00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

%00

%00U%00p%00d%00a%00t%00e%00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00 %00K%00B%002%004%008%008%001%001%003%00 %00 %001%000%00/%002%006%00/%002%000%001%001%00 %00 %00 %00

Is this a bug?

(imported comment written by SecurityMG)

What are you using to read the file? “Line 1 of” or ??? This is HEX dump so guessing it is the way you are reading the file.

Display your code so we can review it

MG

(imported comment written by jpeppers91)

lines

of

file

“c:\temp\hotfixes.txt”

Keep in mind the text file does not have this jibberish in it.

(imported comment written by SecurityMG)

I read a text file just fine using that. So it must be a special formatted text file that is not really a .TXT file. Try another file or create one with Notepad or open and re-save this file as a different name.

Use the ‘QNA’ tool to test your results before placing it in BigFix.

(imported comment written by jpeppers91)

The file was created using this command in a task

waithidden cmd.exe /Q/C wmic qfe get hotfixid,description,installedon >> C:\temp\hotfixes.txt

It reads other text files just fine, just not the Bigfix created text files.

(imported comment written by SecurityMG)

Its your WMIC script that is the issue, it is not a properly formatted .TXT file.

WMIC /?

try the /OUTPUT flag and play with the options