Topic: PE Computer Name Change  (Read 1971 times)

PE Computer Name Change
« on: November 01, 2018, 01:50:50 AM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
Hello guys, been a very long time since I've been here! I see a lot has changed! :) I was wondering how I would go about changing the PE computer name. I changed all the name settings in the PE Network ini and when I go into advance system settings I see the name has changed to what I listed in the PE Newtwok but still shows the old Win10XPE computer name in properties so I am not sure if I am going about this right. I can change "My PC" to the name of my choice with the computer name script but I want to change the Win10XPE computer name.


Thanks for any help!

Re: PE Computer Name Change
« Reply #1 on: November 01, 2018, 02:39:31 AM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
would think it would be the same method as changing Computer Name in PESE
« Last Edit: November 01, 2018, 02:55:20 AM by James »

Re: PE Computer Name Change
« Reply #2 on: November 01, 2018, 05:52:29 AM »

RoyM

  • Jr. Chef
  • **
  • Date Registered: Aug 2017
  • Posts: 80
Hey laddanator.
Quite a few changes 'huh'.

I can't help with Win10XPE, "Cause I haven't gotten my toes wet yet".
But the following batch snippets that I used in Win7-10 are below.
The .reg entries are still viable, I hope they help.
'This is not a working batch, just snippets of a much larger batch.'

If you use wpeinit, pecmd and some other programs during boot of OS, They will reset the COMPUTERNAME.
So run batch after.

*** .cmd snippets ***
@echo off
SETLOCAL EnableDelayedExpansion

Set IPv4=192.168.0.1
Set Subnet=255.255.255.0
Set DNS=192.168.0.5
Set DNS1=192.168.0.50
Set GW=192.168.0.5
REM Set User=System
Set User=Administrator
REM Set Pass=mypass1^&2
Set Pass=mypass123
rem Set IPv6=2507:c:a891:981f:fc44:8194:60e5:08e7
Set Computername=Win7pese
Set RegisteredOwner=Administrator
REM Set IPv6Route=2a01:4f8:62:7061::2
REM Set IPv6DNS1=2004:558:1014:F:68:57:76:178
REM Set IPv6DNS2=2004:558:1004:6:68:57:85:98
REM Set IPv6=
REM Set IPv6=
REM call %SystemRoot%\system32\startnet.cmd

start /wait %SystemRoot%\system32\wpeinit.exe
start /wait %SystemRoot%\system32\netcfg -e -c p -i MS_NDISUIO
%SystemRoot%\system32\reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /t REG_DWORD /v SkipWaitForNetwork /d 1 /f
start /wait %SystemRoot%\system32\net.exe start tcpipreg
start /wait %SystemRoot%\system32\svchost.exe -k NetworkService

Set Computername=%ComputerName%
REM %SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOrganization" /t REG_SZ /d "" /f
%SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOwner" /t REG_SZ /d "%RegisteredOwner%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f
rem %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "DhcpDomain" /t REG_SZ /d "smoothwall" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Hostname" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /t REG_SZ /d "%ComputerName%" /f

REM primary DNS suffix
REM %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Domain" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Domain" /t REG_SZ /d "RoyServer" /f
REM DNS Suffix Search List
REM %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "SearchList" /t REG_SZ /d "smoothwall" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "SearchList" /t REG_SZ /d "Router1" /f


*** The Below Entry, Needs to be set before boot, or broadcoast to shell. ***

%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v COMPUTERNAME /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\setenv.exe -m COMPUTERNAME %ComputerName%

*** Happy Halloween Everybody. ***



Re: PE Computer Name Change
« Reply #3 on: November 01, 2018, 10:18:46 AM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
would think it would be the same method as changing Computer Name in PESE

I never changed the computer name in PESE so not sure.

Re: PE Computer Name Change
« Reply #4 on: November 01, 2018, 10:19:17 AM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
Hey laddanator.
Quite a few changes 'huh'.

I can't help with Win10XPE, "Cause I haven't gotten my toes wet yet".
But the following batch snippets that I used in Win7-10 are below.
The .reg entries are still viable, I hope they help.
'This is not a working batch, just snippets of a much larger batch.'

If you use wpeinit, pecmd and some other programs during boot of OS, They will reset the COMPUTERNAME.
So run batch after.

*** .cmd snippets ***
@echo off
SETLOCAL EnableDelayedExpansion

Set IPv4=192.168.0.1
Set Subnet=255.255.255.0
Set DNS=192.168.0.5
Set DNS1=192.168.0.50
Set GW=192.168.0.5
REM Set User=System
Set User=Administrator
REM Set Pass=mypass1^&2
Set Pass=mypass123
rem Set IPv6=2507:c:a891:981f:fc44:8194:60e5:08e7
Set Computername=Win7pese
Set RegisteredOwner=Administrator
REM Set IPv6Route=2a01:4f8:62:7061::2
REM Set IPv6DNS1=2004:558:1014:F:68:57:76:178
REM Set IPv6DNS2=2004:558:1004:6:68:57:85:98
REM Set IPv6=
REM Set IPv6=
REM call %SystemRoot%\system32\startnet.cmd

start /wait %SystemRoot%\system32\wpeinit.exe
start /wait %SystemRoot%\system32\netcfg -e -c p -i MS_NDISUIO
%SystemRoot%\system32\reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /t REG_DWORD /v SkipWaitForNetwork /d 1 /f
start /wait %SystemRoot%\system32\net.exe start tcpipreg
start /wait %SystemRoot%\system32\svchost.exe -k NetworkService

Set Computername=%ComputerName%
REM %SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOrganization" /t REG_SZ /d "" /f
%SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOwner" /t REG_SZ /d "%RegisteredOwner%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f
rem %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "DhcpDomain" /t REG_SZ /d "smoothwall" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Hostname" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "NV Hostname" /t REG_SZ /d "%ComputerName%" /f

REM primary DNS suffix
REM %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Domain" /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "Domain" /t REG_SZ /d "RoyServer" /f
REM DNS Suffix Search List
REM %SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "SearchList" /t REG_SZ /d "smoothwall" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters" /v "SearchList" /t REG_SZ /d "Router1" /f


*** The Below Entry, Needs to be set before boot, or broadcoast to shell. ***

%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v COMPUTERNAME /t REG_SZ /d "%ComputerName%" /f
%SystemRoot%\System32\setenv.exe -m COMPUTERNAME %ComputerName%

*** Happy Halloween Everybody. ***

Thanks so much, will give this a try! :)

Re: PE Computer Name Change
« Reply #5 on: November 01, 2018, 11:07:21 AM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Create plugin -Replacing ProjectName with your variables

Code: [Select]
%ProjectName%=Win10XPE

*****************
RegHiveLoad,Tmp_System,%RegSystem%
RegHiveLoad,Tmp_Software,%RegSoftware%
//
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\Control\ComputerName\ComputerName,ComputerName,%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\Control\ComputerName\ActiveComputerName,ComputerName,%ProjectName%
//
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,"NV Hostname",%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,Hostname,%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,Domain,%ProjectName%
//
RegWrite,HKLM,0x1,"Tmp_System\ControlSet001\Control\Session Manager\Environment",ComputerName,%ProjectName%
//
RegWrite,HKLM,0x1,"Tmp_software\Microsoft\Windows NT\CurrentVersion",RegisteredOwner,%ProjectName%
//
RegHiveUnLoad,Tmp_Software
RegHiveUnLoad,Tmp_System

Re: PE Computer Name Change
« Reply #6 on: November 01, 2018, 07:10:30 PM »

laddanator

  • Chef
  • ***
  • Location: Virgina
  • Date Registered: Oct 2012
  • Posts: 268
Create plugin -Replacing ProjectName with your variables

Code: [Select]
%ProjectName%=Win10XPE

*****************
RegHiveLoad,Tmp_System,%RegSystem%
RegHiveLoad,Tmp_Software,%RegSoftware%
//
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\Control\ComputerName\ComputerName,ComputerName,%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\Control\ComputerName\ActiveComputerName,ComputerName,%ProjectName%
//
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,"NV Hostname",%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,Hostname,%ProjectName%
RegWrite,HKLM,0x1,Tmp_System\ControlSet001\services\Tcpip\Parameters,Domain,%ProjectName%
//
RegWrite,HKLM,0x1,"Tmp_System\ControlSet001\Control\Session Manager\Environment",ComputerName,%ProjectName%
//
RegWrite,HKLM,0x1,"Tmp_software\Microsoft\Windows NT\CurrentVersion",RegisteredOwner,%ProjectName%
//
RegHiveUnLoad,Tmp_Software
RegHiveUnLoad,Tmp_System

Thank you soooo much! Does the computer names in the PE Newtork.ini have to be changed as well?

Re: PE Computer Name Change
« Reply #7 on: November 01, 2018, 08:33:37 PM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272
Since you already edited PENetwork.ini - can't see it hurting anything

Re: PE Computer Name Change
« Reply #8 on: November 26, 2018, 09:19:17 AM »
  • Location: Israel
  • Date Registered: Dec 2017
  • Posts: 444
I am sorry i don't fully understand how to do this. is it possible to explain a little better?

[1/2] Wrong CodeType [%ProjectName%=Win10XPE], Only alphabet, number and underscore can be used as CodeType ()
[2/2] Wrong CodeType [*****************], Only alphabet, number and underscore can be used as CodeType ()

Re: PE Computer Name Change
« Reply #9 on: December 04, 2018, 11:25:15 AM »
  • Location: Israel
  • Date Registered: Dec 2017
  • Posts: 444
I figured out how to do this.

 

Powered by EzPortal