Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HOW TO TAKE COMPUTER NAME TO A TEXT FILE  (Read 3685 times)

0 Members and 1 Guest are viewing this topic.

RAJESH.M.S

  • Guest
HOW TO TAKE COMPUTER NAME TO A TEXT FILE
« on: August 14, 2004, 01:56:57 AM »
sir,
how can i take the name of a local machine to a text file

msrajesh2

  • Guest
Re: HOW TO TAKE COMPUTER NAME TO A TEXT FILE
« Reply #1 on: August 14, 2004, 03:41:59 AM »
in order to take the computer name to a variable
you need to use the command in autoexec.bat

eg:
set computername=edp

after booting win98 you can type the following command to get the computer name

echo %computername%

I got the solution only after working with system at around 3 hours

johnwill

  • Guest
Re: HOW TO TAKE COMPUTER NAME TO A TEXT FILE
« Reply #2 on: August 14, 2004, 01:36:20 PM »
For 2K/XP, all you'd have to do is:

echo %computername% >c:\name.txt

The name for this example ends up in the file C:\NAME.TXT