Networking Forums

Networking Forums > Computer Networking > Windows Networking > PC name -Dos cmd?

Reply
Thread Tools Display Modes

PC name -Dos cmd?

 
 
mikeb
Guest
Posts: n/a

 
      08-03-2005, 08:25 PM
Is there a DOS command that can be called from a batch file that provides
the computer name? Preferrably for the Win2k and WinXP OSs.

??


 
Reply With Quote
 
 
 
 
dot
Guest
Posts: n/a

 
      08-03-2005, 08:31 PM
mikeb wrote:
> Is there a DOS command that can be called from a batch file that provides
> the computer name? Preferrably for the Win2k and WinXP OSs.
>
> ??
>
>


"hostname.exe"
 
Reply With Quote
 
Neteng
Guest
Posts: n/a

 
      08-03-2005, 08:34 PM
%COMPUTERNAME% is a variable in Windows. From CLI type 'echo
%COMPUTERNAME%', hit enter and you should see your computers name. HTH


"mikeb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there a DOS command that can be called from a batch file that provides
> the computer name? Preferrably for the Win2k and WinXP OSs.
>
> ??
>
>



 
Reply With Quote
 
mikeb
Guest
Posts: n/a

 
      08-03-2005, 09:27 PM
Perfect! That works. Thanks.


"mikeb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there a DOS command that can be called from a batch file that provides
> the computer name? Preferrably for the Win2k and WinXP OSs.
>
> ??
>



 
Reply With Quote
 
Tom Del Rosso
Guest
Posts: n/a

 
      08-04-2005, 06:39 AM
"dot" <"firstname(dot)lastname"@henrywurst.com> wrote in message
news:(E-Mail Removed)...
> mikeb wrote:
> > Is there a DOS command that can be called from a batch file that

provides
> > the computer name? Preferrably for the Win2k and WinXP OSs.

>
> "hostname.exe"


It tries to access DNS, but displays the same info whether I allow it or
not, which is the hostname but no IP info. What is it trying to find out
from DNS?


--

Reply in group, but if emailing add
2 more zeros and remove the obvious.


 
Reply With Quote
 
CyberDroog
Guest
Posts: n/a

 
      08-04-2005, 08:33 AM
On Wed, 3 Aug 2005 13:25:49 -0700, "mikeb" <(E-Mail Removed)> wrote:

>Is there a DOS command that can be called from a batch file that provides
>the computer name? Preferrably for the Win2k and WinXP OSs.


echo %computername%

--
You talk about Japanese technocracy and you get radios. You talk about
German technocracy and you get automobiles. You talk about American
technocracy and you find men on the moon, not once, but several times, and
safely home again.

- Gordon Sinclair: Canadian Radio Journalist, 1973

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11