1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TYPE, Unicode, installer

Discussion in 'Support' started by vefatica, Apr 30, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    Is TYPE supposed to recognize Unicode and display it properly? I found this (fragment of a?) batch file in my temp directory, apparently left by the installer.
    Code:
    t:\> type {1948DD3B-5B8E-48E1-B620-385FB506AAF2}.bat
      e c h o  o f f
    d e l  " h : \ T e m p \ d c 6 d 7 5 a d 8 2 2 6 e 2 0 7 0 d 4 8 c 3 1 3 9 4 9
    d 1 2 2 0 \ u p d a t e r . i n i "
    d e l  " h : \ T e m p \ d c 6 d 7 5 a d 8 2 2 6 e 2 0 7 0 d 4 8 c 3 1 3 9 4 9
    d 1 2 2 0 \ u p d a t e r . d a t "
    : a g a i n
    i f  n o t  e x i s t  " h : \ T e m p \ d c 6 d 7 5 a d 8 2 2 6 e 2 0 7 0 d
    4 8 c 3 1 3 9 4 9 d 1 2 2 0 \ u p d a t e r . e x e "  g o t o  e n d
    i f  e x i s t  " h : \ T e m p \
    It has no BOM. It starts with an '@' which was lost by TYPE. The Unicode isn't handled correctly and the first line is off (compared to the others) by a byte.

    That's the whole file. How did it get chopped off? What about the Unicode?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    TYPE recognizes Unicode files if (1) they have a BOM, or (2) they have recognizable (by Windows) Unicode sequences (like a Unicode CR/LF), and (3) they're not an odd number of bytes (which cannot be Unicode).

    Without seeing the entire physical file, I can't say why it failed the test. And I have no idea what the installer was doing with the file or how/why it was truncated -- that's a question for Microsoft.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    The file was named {1948DD3B-5B8E-48E1-B620-385FB506AAF2}.bat. It, renamed, is attached.
     

    Attached Files:

  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    P.S. Also left, in %TEMP=h:\temp, is a directory, "dc6d75ad8226e2070d48c313949d1220" containing

    4/24/2012 20:55 11,459 updater.dat
    4/23/2012 0:24 524,392 updater.exe
    4/24/2012 20:55 227 updater.ini

    The same structure, with the same names, timestamped a few hours earlier, exists in the old temp location (in appdata). That batfile is longer, but still incomplete/truncated and not recognized as Unicode by TYPE. It's attached.
     

    Attached Files:

  5. mfarah

    Joined:
    Nov 2, 2009
    Messages:
    228
    Likes Received:
    5
    Looks like (corrupted) UTF-16 to me. I'd bet those "spaces" are actually 00.
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    It's 683 bytes, so it obviously cannot be a Unicode (UTF-16) file. So TCC doesn't even bother scanning the file for Unicode strings.
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    So I deleted the old stuff and upgraded to build 63 ... got new leftovers in TEMP. This time the batfile (attached) is 480 bytes. TYPE doesn't show it properly. Why is it there in the first place? Why is it corrupted?
     

    Attached Files:

  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    And TCC silently does nothing when I try to run it.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    Ask Microsoft. It's not in the installer script.
     
  10. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    As far as I can tell, CMD can't execute a Unicode batfile, even with a BOM. Why in the world would Microsoft create one? Googling turns up no connection between the Windows installer and anything called "updater.ini"
     
  11. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    And upon checking, I find that the same thing happens on XP ... in TEMP, a folder containing updater.dat|.exe|.ini and a truncated Unicode batfile without a BOM that was apparently not executed.
     

Share This Page