Jump to content











Photo
* * * * * 2 votes

[script]PENetwork


  • Please log in to reply
669 replies to this topic

#601 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 05 April 2012 - 01:42 AM

Hi Chris, I do not changed something in the language file detection, just a string was not read out ("Title" instead of "MainTitle")
So, it has to be something different.
I think the german language is displayed in your system, cause the default system language could not be detected correctly and the german language file is the last or first file in the file find loop cause it is the newest...
Actually the lang code is read from "HKCUSoftwarePENetwork" -> "LangCode".
I changed it in the 0.58 beta 1 to "HKCU", but for backwards compatibility it is also read from "HKLMSoftwarePENetwork", if nothing is found under "HKCU".
....
So this misbehaviour should start from v.58 on...
...
One thing I found is that there is a logical problem for user locale setting compare.
Can you please post what values are written under:
"HKCUControl PanelInternational" -> "Locale"
"HKLMSYSTEMCurrentControlSetControlNlsLanguage" -> "Default"

Thanks and greets
Holger

[Edit]: Ok, found a problem like I thought, it was already in 0.56...will be fixed in next beta.

#602 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 777 posts
  •  
    France

Posted 05 April 2012 - 07:34 AM

Hi Holger,

OK for HKCU and LangCode, Is there other keys that have changed from HKLM to HKCU ?

Glad you're found something for auto language, here is what I have for fr-FR

"HKCUControl PanelInternational","Locale",040c

"HKLMSYSTEMCurrentControlSetControlNlsLanguage","",Not defined

"HKLMSYSTEMCurrentControlSetControlNlsLanguage","Default",040c

"HKLMSYSTEMCurrentControlSetControlNlsLocale","",040c

Maybe, pending next beta or final, I can do something like this (what do you think about)

If,%pScrollBox2%,Equal,Auto,RegWrite,HKLM,0x1,Tmp_SoftwarePENetwork,LangCode,""

==>

If,%pScrollBox2%,Equal,Auto,Run,%ScriptFile%,AutoLangCode

[AutoLangCode]

Set,%LangCodeValue%,0409

If,%DistLang%,Equal,fr-FR,Set,%LangCodeValue%,040c

If,%DistLang%,Equal,de-DE,Set,%LangCodeValue%,0407

If,%DistLang%,Equal,ru-RU,Set,%LangCodeValue%,0419

If,%DistLang%,Equal,hu-HU,Set,%LangCodeValue%,040e

.......

RegWrite,HKLM,0x1,Tmp_DefaultPENetwork,LangCode,%LangCodeValue%


Thanks :)

#603 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12,028 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 April 2012 - 08:20 AM

This snippet queries the language ID for all currently known %DistLang% values w/o an endless list of "If,%DistLang%, ..."

...

Set,%LangCodeValue%,%DistLang%

Run,%ScriptFile%,LCID2Locale,OUT:%LangCodeValue%,r

StrFormat,RIGHT,%LangCodeValue%,4,%LangCodeValue%

ECHO,%LangCodeValue%

...

[LCID2Locale]

Set,%__List%,"af   00000436sq   0000041Car-ae00003801ar-bh00003C01ar-dz00001401ar-eg00000C01ar-iq00000801ar-jo00002C01ar-kw00003401ar-lb00003001ar-ly00001001ar-ma00001801ar-om00002001ar-qa00004001ar-sa00000401ar-sy00002801ar-tn00001C01ar-ye00002401hy   0000042Baz-az0000042Caz-az0000082Ceu   0000042Dbe   00000423bg   00000402ca   00000403zh-cn00000804zh-hk00000C04zh-mo00001404zh-sg00001004zh-tw00000404hr   0000041Acs   00000405da   00000406nl-nl00000413nl-be00000813en-au00000C09en-bz00002809en-ca00001009en-cb00002409en-in00004009en-ie00001809en-jm00002009en-my00004409en-nz00001409en-ph00003409en-sg00004809en-za00001C09en-tt00002C09en-gb00000809en-us00000409en-zw00003009et   00000425fa   00000429fi   0000040Bfo   00000438fr-fr0000040Cfr-be0000080Cfr-ca00000C0Cfr-lu0000140Cfr-ch0000100Cgd-ie0000083Cgd   0000043Cde-de00000407de-at00000C07de-li00001407de-lu00001007de-ch00000807el   00000408he   0000040Dhi   00000439hu   0000040Eis   0000040Fid   00000421it-it00000410it-ch00000810ja   00000411ko   00000412"

StrFormat,POS,%__List%,#1,%__Pos%

If,%__Pos%,EQUAL,0,Begin

Set,%__List%,"lv   00000426lt   00000427mk   0000042Fms-my0000043Ems-bn0000083Emt   0000043Amr   0000044Enb-no00000414nn-no00000814pl   00000415pt-pt00000816pt-br00000416rm   00000417ro   00000418ro-mo00000818ru   00000419ru-mo00000819sa   0000044Fsr-sp00000C1Asr-sp0000081Atn   00000432sl   00000424sk   0000041Bsb   0000042Ees-es0000040Aes-ar00002C0Aes-bo0000400Aes-cl0000340Aes-co0000240Aes-cr0000140Aes-do00001C0Aes-ec0000300Aes-gt0000100Aes-hn0000480Aes-mx0000080Aes-ni00004C0Aes-pa0000180Aes-pe0000280Aes-pr0000500Aes-py00003C0Aes-sv0000440Aes-uy0000380Aes-ve0000200Ast   00000430sw   00000441sv-se0000041Dsv-fi0000081Dta   00000449tt   00000444th   0000041Etr   0000041Fts   00000431uk   00000422ur   00000420uz-uz00000843uz-uz00000443vi   0000042Axh   00000434yi   0000043Dzu   00000435"

StrFormat,POS,%__List%,#1,%__Pos%

End

If,#2,EQUAL,,Begin

StrFormat,Dec,%__Pos%,5

StrFormat,MID,%__List%,%__Pos%,5,%__tmp%

End

Else,Begin

StrFormat,Inc,%__Pos%,5

StrFormat,MID,%__List%,%__Pos%,8,%__tmp%

End

StrFormat,REPLACE,%__tmp%,#$s,,#1

Compare IndexImage.script of multiPE.

Peter :cheers:

#604 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 05 April 2012 - 09:26 AM

Thanks for ideas, but the idea was primary to set only the language code ID to something that the user wants, so if the system is english only you can still have PENetwork in Italian, etc.
By default the language strings are in English.
Normally you wouldn't need the english language file, it's more for extending your own language file to see what new strings were added.
The problem was that the LCID was read out from file and detected correctly from system but wrong compared.
So, ie. on my system the locale ID under HKCU is "00000407" and not just "0407".
The comparison was wrong as to numbers - don't know why I came to this, maybe I thought the hex values were converted correctly to numbers - and so the string "0000040C" for instance was converted to "40" - letters were ignored on converting - I just used the wrong converting method.
And so it could happen that if you have "040C" on your system that the language file with ID "040E" could also be your 'right' language file, cause "0000040C" -> "40" and "0000040E" -> "40" -> "40" = "40"...

So long :)
Holger

#605 GEOSoft

GEOSoft
  • Members
  • 2 posts
  •  
    Canada

Posted 05 April 2012 - 05:49 PM

Greetings Holger.
It's been a long time my old friend.
Is there any particular reason that you have to read the information from the registry instead of using a dll call to GetLocaleInfoW (kernel32.dll)?
Although I do remember having some issue with the German language return value. As far as I recall that was the only language that gave me an issue and i don't remember how I worked around it.

Of course I'm just getting into using WinBuilder so I'm not yet familiar with all the in's and outs; hence my reason for the question.

George

Edited by GEOSoft, 05 April 2012 - 05:52 PM.


#606 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 05 April 2012 - 08:23 PM

Greetings Holger.
It's been a long time my old friend.
Is there any particular reason that you have to read the information from the registry instead of using a dll call to GetLocaleInfoW (kernel32.dll)?
Although I do remember having some issue with the German language return value. As far as I recall that was the only language that gave me an issue and i don't remember how I worked around it.

Of course I'm just getting into using WinBuilder so I'm not yet familiar with all the in's and outs; hence my reason for the question.

George


Hi George,

I see no advantage to call a dll to get the user and system lang code id.
Reading out 2 values from registry is more easy.
So next version (just bugfixing so far) will be published tomorrow, then the right language file should be detected ;)

Greets :)
Holger

#607 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 777 posts
  •  
    France

Posted 05 April 2012 - 11:48 PM

So next version (just bugfixing so far) will be published tomorrow, then the right language file should be detected ;)

:thumbsup:
I just update PENework.script on Win7PE_SE server before, I'll do it again tomorrow with 0.58 beta6 ;)
Inside, latest version selected by default, version 056 removed, HKLM->HKCU for some key (following your faqs), Added "CloseToTray" and New "StartToTray".
http://w7pese.cwcodes.net/Projects/Win7PE_SE/Components/penetwork.script


Off topic, About GetLocaleInfoW, I use it in an au3 script with also LCIDToLocaleName and LocaleNameToLCID (kernel32.dll) Attached File  LCIDUtil.7z   3.54K   146 downloads
To write the localizations information in an ini file, some data are in Unicode following language. Not necessarily the same input language vs registry here.
but ini files are normally not unicode :confused1: (forced to write with FileWrite).
Do you have a good practice about that.

Regards :)

#608 GEOSoft

GEOSoft
  • Members
  • 2 posts
  •  
    Canada

Posted 06 April 2012 - 02:20 PM

Hi. Chris

Rather than take this thread OT any longer; if you PM me on any of the forums you know I visit, I can tell you the 2 methods I've used to overcome that Unicode issue in the past.

#609 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 07 April 2012 - 12:30 PM

Need some more time.
Maybe on Monday evening it should be ready so far, cause I'm just implementing some other stuff that I always wanted to.
Greets :)
Holger

#610 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12,028 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 07 April 2012 - 12:36 PM

With all that work do NOT forget to look into your garden, whether some easter-eggs are hidden for you.

Happy eastern!

Peter :cheers:

#611 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 14 April 2012 - 08:00 PM

Published version update v.058.B6 of PENM (14.04.2012) :beta:
- Fixed: Network adapter state icon not updated correctly if adapter selection was changed and state was the same like for the previous one
- Fixed: Language code detection problem cause of wrong comparing mode
- Fixed: Missing color applying for trace label/checkbox, hops label and result checkbox in Ident GUI
- Fixed: More than 1 DNS servers not shown correctly in different lines in Tray info window
- Fixed: Missing translations
- Changed: Maximum username length to UNLEN (256) and password length to PWLEN (256) in Shares GUI
- Changed: If a 'sharing' user could be added successfully then the password field is always filled with dots, on password input the dots are removed
- Removed: Unused stuff in 'Other' GUI (not finished cmdline things - will be maybe return in 'Profiles' GUI in a later version)
- Added: "LastPage" value to open specific or last used tab on startup
- Added: Using of WMI for applying IP settings (Experimental!, needs working WMI under WinPE)

Update is available from
http://holger.winbuilder.net
or
http://holger.orgfree.com


Greets
Holger

Attached Thumbnails

  • v0.58.B6.jpg


#612 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,687 posts

Posted 14 April 2012 - 08:48 PM

- Added: Using of WMI for applying IP settings (Experimental!, needs working WMI under WinPE)

Do you mean to say, that PENetwork requires now WMI or that it will use WMI, if available?

:cheers:

#613 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 14 April 2012 - 10:47 PM

Do you mean to say, that PENetwork requires now WMI or that it will use WMI, if available?

:cheers:

You can use WMI optional to apply the IP settings only if it is available, maybe it can better work with some problematic adapters like Broadcom, etc.
By default (and this will not change) the settings are replied by writing the values to the registry and then restarting the network adapter.
The WMI option is experimental at the moment and will only work with PE2.X/3.X... cause from Vista on there is a command to disable/enable a network adapter.
There are also some undocumented API's which would work with XP/PE1.X (DhcpNotifyConfigChange or SetAdapterIpAddress) but I will not implement these.
Can't understand until today why Microsoft didn't make these functions public, cause the simple functions "AddIPAddress" and "DeleteIPAddress" are not really helpfull :ermm:

#614 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 14 April 2012 - 10:59 PM

Please re-download the archives for v.058.B6 of PENM if you have already downloaded them.
I just forgot to correct a numeric value.
So I did not change the version.
Thanks.

#615 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 14 April 2012 - 11:17 PM

Downloads stopped cause problem with 64bit... :exclamation:

#616 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 14 April 2012 - 11:37 PM

Published version update v.058.B7 of PENM (15.04.2012) :beta:
- Fixed: Crash on 64bit while switching to 'Other' GUI
- Fixed: Missing internal change of a numeric value


Update is available from
http://holger.winbuilder.net
or
http://holger.orgfree.com


Greets :whistling: :suda:
Holger

#617 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7,687 posts

Posted 14 April 2012 - 11:54 PM

By default (and this will not change) the settings are replied by writing the values to the registry and then restarting the network adapter.

Thank goodness! You had me there worried for a bit.

:cheers:

#618 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 777 posts
  •  
    France

Posted 15 April 2012 - 08:54 AM

Published version update v.058.B7 of PENM (15.04.2012) :beta:


Thank you for ALL this beautiful work :thumbsup:

For Win7PE_SE users and for a better feedback, here is the last PENetwork script with v.058.B7 inside and selected by default.
on w7pese server, here http://w7pese.cwcodes.net/Projects/Win7PE_SE/Components/penetwork.script

Regards,
:cheers:

#619 patsch

patsch

    Silver Member

  • Advanced user
  • 778 posts
  •  
    Germany

Posted 15 April 2012 - 11:58 AM

I got an error ... don't know if its an error within win7pe_se ..

[Success] IF - [german] is equal to: [german] evaluated string: [If,%pScrollBox2%,Equal,German,RegWrite,Set,%LangCodeValue%,0407]
[Warning] Reference to undefined variable: [%LangCodeValue%]
[Failed] RegWrite - Failed to write REG key in root key: [Set] Type: [%LangCodeValue%] A file was not chosen from: [0407]: Unknown error


I used the version from ChrisR linked above this Post

#620 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 777 posts
  •  
    France

Posted 15 April 2012 - 01:27 PM

I got an error ... don't know if its an error within win7pe_se ..


Oups, my fault :blush:, I was too fast without testing.
Corrected, new script is on server http://w7pese.cwcodes.net/Projects/Win7PE_SE/Components/penetwork.script

#621 patsch

patsch

    Silver Member

  • Advanced user
  • 778 posts
  •  
    Germany

Posted 15 April 2012 - 02:05 PM

thx, that works :good:

#622 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 16 April 2012 - 08:33 PM

Published version update v.058.B8 of PENM (16.04.2012) :frusty:
- Fixed: Problem with tray info window while reading DNS server string
- Fixed: 15 chars limitation of DNS suffix -> 63 chars maximum

Update is available from
http://holger.winbuilder.net http://holger.reboot.pro
or
http://holger.orgfree.com


Greets :boredom:
Holger

#623 vvurat

vvurat

    Frequent Member

  • Advanced user
  • 314 posts

Posted 21 April 2012 - 02:40 PM

Just i want to ask a basic and probably common question. I am not sure if it is right topic but how to start penetwork silent to systemtray? It starts ok at boot but when it starts it show "Please wait..." window and loads basic services and card drivers. I want that it make these at backgound

#624 Holger

Holger

    Silver Member

  • .script developer
  • 502 posts
  • Location:Munich
  • Interests:- scooter driving / modifying
    - programming / scripting
  •  
    Germany

Posted 21 April 2012 - 11:13 PM

Hello, there is no possibility at the moment.
Cause no one didn't had a problem with the 'information' window before so it was not build in.
However, it's easy to implement....so planned for next release.

Greets :)
Holger

#625 vvurat

vvurat

    Frequent Member

  • Advanced user
  • 314 posts

Posted 21 April 2012 - 11:21 PM

Thank you. It can be very informative sometimes but also sometimes it takes too much time for to wait it load on desktop. If there can be a switch for it will be great. Wish you to keep both options




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users