[wpkg-users] find/findstr and multibyte...

Marco Gaiarin gaio at sv.lnf.it
Mon May 23 12:23:05 CEST 2016


I need to programmatically rename the network connection, and i've
found that tool:

	https://windowsnlmtool.codeplex.com/

i've tested a bit, i've verified that do what i need and then i've
tried to write around it a little CMD wrapper for WPKG.

But strange things happens:

 C:\Users\Administrator>\\file\wpkg\tools\NLMtool64.exe
 Windows NLM Tool version 0.1 (2015-10-11)
 For the documentation and new releases visit:
 https://windowsnlmtool.codeplex.com/
 
 Overall connectivity: IPV4_INTERNET IPV6_LOCALNETWORK
 ============ Now let's try to enumerate networks ============
                Index: 0
           Network id: {3178E6B0-90B8-46C4-B0F4-F967822745EC}
         Connectivity: IPV4_INTERNET IPV6_LOCALNETWORK
             Category: PRIVATE
          Domain type: NON_DOMAIN_NETWORK
                 Name: Rete
          Description: Rete
              Created: 2016-03-15 09:06:40
            Connected: 2016-05-23 11:32:33
 ================ No more (suitable) networks ================
     Listed networks: 1
      Total networks: 1

 C:\Users\Administrator>\\file\wpkg\tools\NLMtool64.exe | find "Listed networks: 1"

 C:\Users\Administrator>\\file\wpkg\tools\NLMtool64.exe | findstr /C:"Listed networks: 1"


After hitting my head on the wall, i think i've found the culprit:

 C:\Users\Administrator>\\file\wpkg\tools\NLMtool64.exe > %TEMP%\test.txt
 
 C:\Users\Administrator>type %TEMP%\test.txt
 Windows NLM Tool version 0.1 (2015-10-11)
 For the documentation and new releases visit:
 https://windowsnlmtool.codeplex.com/
 
 O v e r a l l   c o n n e c t i v i t y :   I P V 4 _ I N T E R N E T  I P V 6 _ L O C A L N E T W O R K
 = = = = = = = = = = = =   N o w   l e t ' s   t r y   t o   e n u m e r a t e  n e t w o r k s   = = = = = = = = = = = =
                               I n d e x :   0
                     N e t w o r k   i d :   { 3 1 7 8 E 6 B 0 - 9 0 B 8 - 4 6 C 4 - B 0 F 4 - F 9 6 7 8 2 2 7 4 5 E C }
                 C o n n e c t i v i t y :   I P V 4 _ I N T E R N E T I P V 6 _ L O C A L N E T W O R K
                         C a t e g o r y :   P R I V A T E
                   D o m a i n   t y p e :   N O N _ D O M A I N _ N E T W O R K
                                 N a m e :   R e t e
                   D e s c r i p t i o n :   R e t e
                           C r e a t e d :   2 0 1 6 - 0 3 - 1 5   0 9 : 0 6 : 4 0
                       C o n n e c t e d :   2 0 1 6 - 0 5 - 2 3   1 1 : 3 2 : 3 3
 = = = = = = = = = = = = = = = =   N o   m o r e   ( s u i t a b l e ) n e t w o r k s   = = = = = = = = = = = = = = = =
           L i s t e d   n e t w o r k s :   1
             T o t a l   n e t w o r k s :   1

 C:\Users\Administrator>

Seems to me that (apart the header) output is 'multibyte' (UCS16?), and
this confuse find.

I'm not a windows expert... there's some way to fix/circumvent, or
this can be considerend a bug?


Thanks.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''          http://www.lanostrafamiglia.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
    http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)


More information about the wpkg-users mailing list