Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Encoding of MSIEXEC /L file


4 replies to this topic

anySmarterIdRunLinux

anySmarterIdRunLinux
  • Full Members
  • 2 posts

Posted 31 July 2009 - 14:26

Hi All-

Going bald trying to figure out what should be simple. God Bless Microsoft.

I have installed 170+- applications (packages) via msiexex /i app.msi /L logfile. I would now like to write a quick script to open each log file, search for 'completed successfully', and enumerate those files that did not 'complete successfully'. However, when I open the log file, I see

x00:\x001\x002\x00:\x00 \x00I\x00N\x00S\x00T\x00A\x00L\x00L\x00.\x00 \x00R\x00E\x00T\x00U\x00R\x00N\x00 \x00V\x00A\x00L\x00U\x00E\x00 \x001\x00.\x00\r\x00\n\x00M\x00S\x00I\x00 \x00(\x00S\x00)\x00 \x00(\x005\x000\x00:\x00E\x00C\x00)\x00 \x00[\x001\x008.

2 Questions:

1) How is this encoded? I can open each file in textpad and save in notepad and end up w/ ascii. I don't want to do that. What are my options? Using Python to script..
2) Why is MS soo freakin' stupid and inconsistent at every turn? (don't need an answer to this. just need to scream)

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 July 2009 - 14:42

I've never seen this. Whenever I open a log file in Notepad it is displayed as ASCII text.

anySmarterIdRunLinux

anySmarterIdRunLinux
  • Full Members
  • 2 posts

Posted 31 July 2009 - 15:34

QUOTE (Stefan Krueger @ 2009-07-31 14:42)
I've never seen this. Whenever I open a log file in Notepad it is displayed as ASCII text.

In any text editor, it is plain text. when i open it via infile = open(filename).read(), it looks like hex. I have only encountered this when dealing with MS log files, and only occasionally. (half of SQL server log files are this way. the other half are encoded as ascii).

If i can at least determine how it is encoded, I should be able to convert it to ascii, and manipulate it w/ any given scripting language (python is my default).

thanks for reading my post. let me know if you have any thoughts.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 03 August 2009 - 02:36

I've had this sometimes when using Ultra Edit to look at the log file. I *think* the log file is UTF8 encoded.

In these instances, I couldn't find out how to fix it so in the end I had to write a piece of code to remove every second character.

Another idea is that you could just check the event viewer if all you need to do is see if they worked or not. There should be an entry for each msi application you install.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 03 August 2009 - 09:21

The log is written in Unicode, not ASCII - so feature names, error messages etc. are logged correctly regardless whether they are stated in Cyrillic, Katanaka etc.
You may need to replace the python script with a script language that can deal with Unicode, for instance VBScript.