Discussion Locked

Renaming Computers

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Here is the situation,

we have about 400 computers all over our buisness. We have sales, HR, this and that. We want all computers in the SALES dept to have computer names from
buis0001 to buis1000

all computers in HR to have names
buis1001 to 2001

ect.

Is there an easy way to rename these computers? A batch file or anything? Right now the only solution we have is to go around to EVERY computer and manually rename it. These computers are mixed win95 / nt. ( no 98 )

Thanks

5 replies

by tridom

I couldn't tell you the answer to this, but do have a bit of FYI info about renaming vs SQL. If you are running SQL Server on any of the computers you will need to reload it after renaming the machine. We found that out the hard way. Just wanted tohelp you head this problem off in case it pertained to you.

by prasannaa

The most common way to set the COMPUTERNAME/USERNAME variable in Windows 9x is to use NET CONFIG's output, like this small 'hardcore' batch file:

@echo off
%2 path > %TEMP%.\tmp2.bat
%2 for %%V in (Computer User) do call %0 %%V ::
%2 for %%Xin (del goto:End) do %%X %TEMP%.\tmp?.bat
NET CONFIG | FIND "%1 name" > %TEMP%.\tmp1.bat
echo set %1NAME=%%2>%TEMP%.\%1.bat
PATH %TEMP%
for %%X in (1 2) call %TEMP%.\tmp%%X.bat
:End

But, if there are white space characters in the computer and/or user name this batch would fail.

i think my answer help you

Cheers!!!

This discussion is closed to new replies.