|
zorsite
新手上路

积分 12
发帖 9
注册 2006-3-17
状态 离线
|
   『楼 主』:
如何用批处理自动更改电脑名?
使用 LLM 解释/回答一下
如果有很多同样的电脑都是克隆安装的,装好后电脑的名字都一样,一旦连接上网便会出现“网上有重名”的提示。那么怎么用批处理来更改这些电脑的名字?命名规则可以采用“前缀”+“IP地址最后一段”。比如前缀设为H,IP为192.168.7.3;192.168.7.147,那么电脑名字就分别为:H3、H147。
----------------------------------------------------------------------------------------------------------
附带问一个其他的问题:
还是这样一批电脑,系统属性里也全是一样的信息。比如:
注册到:
USER
DELL
这样会有一个问题,比如我安装OFFICE,金山词霸的时候,用户名和单位里会自动填充上这些信息。有没有办法用批处理自动更改注册信息?
----------------------------------------------------------------------------------------------------------
If there are many identical computers cloned and installed, and after installation, the computer names are all the same. Once connected to the Internet, the "There are duplicate names on the network" prompt will appear. Then how to use batch processing to change these computer names? The naming rule can adopt "prefix" + "last segment of the IP address". For example, if the prefix is set to H, and the IPs are 192.168.7.3; 192.168.7.147, then the computer names will be H3, H147 respectively.
----------------------------------------------------------------------------------------------------------
附带问 another question:
Still such a batch of computers, and the system properties are all the same information. For example:
Registered to:
USER
DELL
There will be a problem. For example, when I install OFFICE, Kingsoft Iceberg, the user name and unit will be automatically filled with these information. Is there a way to use batch processing to automatically change the registration information?
|
|
2006-11-9 00:33 |
|
|
holee
初级用户
 
积分 53
发帖 27
注册 2005-7-18
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
路过,关注这个问题。
Passing by, paying attention to this issue.
|
|
2006-11-11 12:08 |
|
|
zerocq
中级用户
  
积分 458
发帖 196
注册 2006-10-5
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
这些信息都是修改注册表的
修改计算机名可以通过调用控制面板来实现,也可以通过调用注册表编辑器来实现。比如要将计算机名由'MMX233'改为'P233',则可以按照下述方法进行操作:打开HKEY_LOCAL_MACHINE\System\CurrenControlSet\Control\ComputerName\ComputerName,将名为'ComputerName'的主键的值从原来的'MMX233'更改为'P233',注销用户或重新启动Windows后就会生效。
找点修改注册表个性化电脑的资料看下吧
找到修改点,可以用批处理/vbs来个改,很容易:D
Last edited by zerocq on 2006-11-11 at 01:17 PM ]
All this information is about modifying the registry.
The computer name can be modified by calling the Control Panel or by calling the Registry Editor. For example, to change the computer name from 'MMX233' to 'P233', you can follow these steps: Open HKEY_LOCAL_MACHINE\System\CurrenControlSet\Control\ComputerName\ComputerName, change the value of the key named 'ComputerName' from the original 'MMX233' to 'P233', and it will take effect after logging off the user or restarting Windows.
Find some materials for personalizing the computer by modifying the registry to have a look.
Find the modification points, and you can use batch processing/vbs to make the change, which is very easy :D
Last edited by zerocq on 2006-11-11 at 01:17 PM ]
|
|
2006-11-11 13:15 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
坛子里有不少这种问题,搜索一下吧。
另外无忧启动论坛里也有。
There are quite a few such problems in the forum. Just search it. Also, there is in Wuyou Boot Forum.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2006-11-11 21:33 |
|
|
hxuan999
中级用户
   DOS之日
积分 337
发帖 161
注册 2006-11-4
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
我也关注一下。
I will also pay attention.
|

for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul |
|
2006-11-13 07:43 |
|
|
honhaizh
初级用户
 
积分 35
发帖 18
注册 2006-4-26
状态 离线
|
『第 6 楼』:
我最近刚好在研究这个问题
使用 LLM 解释/回答一下
发现有两个工具可以实现都是ghost8.3套件里的:
(1)ghstwalk.exe:纯DOS下给Windows改名,可以指定名字,或者随机分配
(2)GhRegEdt.exe:纯DOS下修改Windows注册表,更改以下键值:
HKLM\SYSTEM\ControlSet001\Control\ComputerName\ComputerName
ComputerName
HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters
NV Hostname
I found two tools that are both in the Ghost 8.3 suite:
(1) ghstwalk.exe: Rename Windows under pure DOS, can specify a name or assign randomly
(2) GhRegEdt.exe: Modify Windows registry under pure DOS, change the following key values:
HKLM\SYSTEM\ControlSet001\Control\ComputerName\ComputerName
ComputerName
HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters
NV Hostname
|
|
2006-11-16 19:52 |
|
|
tyh
初级用户
 
积分 80
发帖 43
注册 2007-4-21
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
呵呵.这个我知道. 更改计算机名使用 wmic computersystem where "name='%nowname%'" call rename %name%
'%nowname%' 是现在的 名字, %name% 是你想改的名字.
同理: 更改工作组
wmic computersystem where "domain='%work%'" call joindomainorworkgroup "","","%group%",1
Last edited by tyh on 2007-4-21 at 05:05 PM ]
Heheh. I know this. To change the computer name, use wmic computersystem where "name='%nowname%'" call rename %name%
'%nowname%' is the current name, %name% is the name you want to change to.
Similarly: To change the workgroup
wmic computersystem where "domain='%work%'" call joindomainorworkgroup "","","%group%",1
Last edited by tyh on 2007-4-21 at 05:05 PM ]
|
|
2007-4-22 05:58 |
|
|
lmj243
新手上路

积分 6
发帖 6
注册 2007-3-17
状态 离线
|
|
2007-4-23 03:37 |
|
|
wgx1688
初级用户
 
积分 60
发帖 34
注册 2007-4-24
状态 离线
|
|
2007-4-24 04:15 |
|
|
bjsh
银牌会员
    
积分 2000
发帖 621
注册 2007-1-1
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
RE:LS
可以的啊!
试试这个;自动把你的计算机名称改为H和IP最后一位结合的名字.
xpsp2测试通过
- @echo off
- for /f "tokens=17 delims=:." %%a in ('ipconfig ^|findstr "IP Address" ^| more +1') do set "NAME=H%%a"
- echo %NAME%
- wmic computersystem where "PrimaryOwnerName='%username%'" call rename %NAME%
BJSH发表于: 2007-04-23 16:25
RE:LS
Sure!
Try this; automatically change your computer name to a name combined with H and the last digit of the IP.
Tested on xpsp2
- @echo off
- for /f "tokens=17 delims=:." %%a in ('ipconfig ^|findstr "IP Address" ^| more +1') do set "NAME=H%%a"
- echo %NAME%
- wmic computersystem where "PrimaryOwnerName='%username%'" call rename %NAME%
Posted by BJSH on: 2007-04-23 16:25
|
|
2007-4-24 05:40 |
|
|
zk0888
新手上路

积分 6
发帖 3
注册 2007-9-12
状态 离线
|
|
2008-3-13 11:38 |
|
|
tian88yuan
新手上路

积分 9
发帖 6
注册 2010-5-27
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
在网上找到的修改计算机名字的bat
-----------------------------
@echo off
title 修改计算机名
set /p cname=请输入计算机名:
echo REGEDIT4 >name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName] >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName] >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName] >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ComputerName\ComputerName] >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] >> name.reg
echo "NV Hostname"="%cname%" >> name.reg
echo "Hostname"="%cname%" >> name.reg
echo [HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\ShellNoRoam] >> name.reg
echo @="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName] >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters] >> name.reg
echo "NV Hostname"="%cname%" >> name.reg
echo "Hostname"="%cname%" >> name.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] >> name.reg
echo "DefaultDomainName"="%cname%" >> name.reg
echo "AltDefaultDomainName"="%cname%" >> name.reg
name.reg
pause
A batch file for modifying the computer name found online
-----------------------------
@echo off
title Modify Computer Name
set /p cname=Please enter the computer name:
echo REGEDIT4 >name.reg
echo >> name.reg
echo >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo >> name.reg
echo "NV Hostname"="%cname%" >> name.reg
echo "Hostname"="%cname%" >> name.reg
echo >> name.reg
echo @="%cname%" >> name.reg
echo >> name.reg
echo "ComputerName"="%cname%" >> name.reg
echo >> name.reg
echo "NV Hostname"="%cname%" >> name.reg
echo "Hostname"="%cname%" >> name.reg
echo >> name.reg
echo "DefaultDomainName"="%cname%" >> name.reg
echo "AltDefaultDomainName"="%cname%" >> name.reg
name.reg
pause
|
|
2010-5-29 11:06 |
|