WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Get Machine Name - Workstation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get Full Computer Name


Question:

Does anyone have any ideas on how to get the full computer name? When you right click on my computer and in the tab for the computer name it shows the Full Computer name like myserver.mydomain.com.

User Reply:

This appears to work.

HostName = RegQueryValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters[Hostname]")
Domain = RegQueryValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters[Domain]")
FullCompName = StrCat(HostName, ".", Domain)
Message("Full Computer Name", FullCompName)
Info from
http://www.jsiinc.com/SUBH/tip3900/rh3982.htm
Article ID:   W16491
File Created: 2005:02:18:12:20:56
Last Updated: 2005:02:18:12:20:56