Computer/Host Name problem with WinBuildermodify computer name
Posted 27 June 2012 - 03:11 PM
I believe the problem is somewhere in the PENetwork and/or the Optimization Script.
The default Computer/Host Name is Win7pese but once the system boots up, BGInfo displays the computer/host name as Win7pese but running ipconfig/all at the command prompt shows the computer/host names as: win7pese ; this is the problems.
Can you help me? I need to know where in the script does it write the computer/host name and makes it all lower case. I need to change that code to make it upper case; in this example I need it to be Win7pese for my DHCP to work correctly not win7pese.
I'm using the following:
If you require additional information to help me resolve my problem, please let me know. This is all new to me but it is a very good learning experience. Thanks
Posted 28 June 2012 - 04:02 AM
Posted 28 June 2012 - 05:31 AM
The hostname in optimizations did not take any effect
Posted 30 June 2012 - 01:15 AM
I'm not sure why there is a case difference between the BGInfo or the other tools - Or if as mentioned, you will have to "fix" it by writing a script, but try it...(and remember to check the box to force a static name!
ScreenHunter_13 Jun. 29 21.09.jpg 25.77KB 4 downloads
Posted 30 June 2012 - 08:44 PM
So I just did a minimal build, and it is working MOSTLY as expected, where the default selected profile in PENetwork is used to set the name (or if you don't run it, then the Optimization script sets it.
BUT, there is also a bit of an issue *IF* you are looking for a specific case on the initial character, depending on what you use to retrieve the "hostname". This is why BGInfo and ipconfig get different values.
You can see this effect if you look for the "name" in the registry (in ALL the various places it might be)...For example, on a boot, the "hostname" (used in the ipconfig) would be lower case, while the Computer name is upper case. This may just be a result of the automatic setting of the hostname from the computer as it loads the tcp/ip as PE network, and finds the adapter and causes it to create a "hostname" from the ComputerName...??? At least this is my guess.
Now it gets interesting since if you use PENetwork MANUALLY after the first time it is run, it acts differently, and this is by design (as far as I can tell from looking at Holger's web space and the Autoit code he has posted there.
In fact, he intentionally does NOT try to change the names on the first boot. He sets it before the adapter is loaded (this would overwrite the one from Optimizations), BUT, manually, or if not at the initial boot, he will re-write the name, since the adapter is already loaded.
It MIGHT be possible to make it re-write the hostname (as well as computer name)...I'll play with that a bit. But for now, if you access the "hostname", it will most likely be lower case!
But the bottom line is also how your application (which you mention needs an uppercase letter) gets it's value. As mentioned above, the Optimization script just is putting in place the "computer name"...This is also what PENetwork will replace if you specify a profile name.
The issue is that as things boot up, TCP/IP isn't loaded yet, and it is setting the "hostname"
Edited by sbaeder, 30 June 2012 - 10:03 PM.
lots more details on the issue
Posted 30 June 2012 - 09:47 PM
Posted 01 July 2012 - 08:34 PM
For example, I set the name inside the Optimization script, DISABLE PENetwork, and run the PE. I MANUALLY load a driver for the Ethernet adapter, and look at the host name. It is lower case.
Same thing if I use a profile (and put it inside BOTH places). The name is set, but it is lower case if it is set at the startup by PENetwork. If I run it manually after the adapter is already enabled, then it is mixed case as specified.
The issue would be (maybe?) to have PENetwork run both before the shell is loaded and after? I am still playing with this. But as I said, I'm pretty sure it is all related to the lack of a running TCP/IP environment when you set the name of the machine !
Posted 09 July 2012 - 01:28 AM
I'm on vacation this week and will not be able to vefify the results until next week but I was hoping that maybe I was not doing something correctly or missing some setting or something. I'm very new at this but welling to try any suggesting you may have. Again Thanks,
Posted 10 July 2012 - 01:34 PM
The hostname in optimizations did not take any effect
It works fine but you must enablethe "Use static ComputerName" checkbox.
By cons, as you know, PENetwork overwrites the computername by the one of PENetwork.ini.
Our computer network requires a Capital 'W' to be the first character in the Computer/Host Name, how every during WinBuilder's build process the Host/Computer Name is always lower case characters 'w'.
It seems, Indeed, there is a problem on the latest PENetwork 0.58b8 which converts the computer name in lowercase.
The version 0.57.2 seems to work correctly for this. You can use it but without the benefit of Hoger's recent improvements .
Otherwise with the latest version, you can use this small batch to change the computer name.
:: first line environment: need a program to broadcast changes Environment reg.exe add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v COMPUTERNAME /t REG_SZ /d Win7pese /f reg.exe add HKLMSYSTEMCurrentControlSetControlComputerNameComputerName /v ComputerName /t REG_SZ /d Win7pese /f reg.exe add HKLMSYSTEMCurrentControlSetControlComputerNameActiveComputerName /v ComputerName /t REG_SZ /d Win7pese /f reg.exe add HKLMSYSTEMCurrentControlSetservicesTcpipParameters /v "NV Hostname" /t REG_SZ /d Win7pese /f reg.exe add HKLMSYSTEMCurrentControlSetservicesTcpipParameters /v Hostname /t REG_SZ /d Win7pese /f exit
And use for this, in PENetwork script the "Include files in system32 from this directory:" to add it,
and in Network profile Editor add this batch in "Cmds after startup" tab.
I also saw, in both version, a slight problem with the variable %computername% (HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment)
Which requires broadcast changes Environment.
I will post these 2 small problems to Holger, to further improve its excelent PENetwork
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users