Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Computer name in Net command
#1
Hi Gintaras,
I am having trouble with the net command in specifying the computer name. The net command works if an ip address is entered but not reliably if computer name is entered. Because ip address works, I know it should not be due to IP blocking from firewall. Exception is in the firewall list also.
Interestingly, the GetUserComputer command returns a computer name in all caps, yet in the Name portion of Computer Info on the Options->Network tab, it's in small case and has the domain.org attached to it. If I put the name of the computer I am sending to in all caps, the command is received on some computers but not others. Some require it in all lower case or even mixed. None will recognize if I add the domain.
I would prefer not to use IP address because it changes from time to time but the computer name stays static.
Any explanation for this strange behaviour?
Thanks,
S
#2
No explanations.

Try this: TCP/IP server and client

It uses same API functions as net().
net() is simpler to use, but this is more flexible (low level).
#3
Hi Gintaras,
Thanks for the tcp help. I will have to play more with the TcpSocket functions.
This may be another dead-end question but just thought I would run it by you.
The ip address that ipconfig returns is different than the one that GetIpAddress returns for a given computer name on certain computers in my system..just a few.
What's also weird is that these are the computers that won't respond to the net command if I just give a computer name instead of computer address.
Is there any reason why the computer's ipconfig ip address would be different than the one that GetIpAddress returns.
I tracked down the ip address that GetIpAddress returns and it is given to another computer in the system on a different domain (I think it is a different domain it is the same node (i.e. ip address up to the numbers after the last . ) but a different domain name after ComputerName.domain.org ie.different domain.org
I hope this isn't too confusing. Just wondering if it was a stereotypical problem or it's a known quirk of how our IT guys set up the ip addresses of these stations.

Thanks,
S
#4
maybe it has something to do with the fact that these are dynamic ip addresses and get updated from time to time. Could the GetIpAddress function be getting the old Ip address?
S


Forum Jump:


Users browsing this thread: 1 Guest(s)