I'm using the SetComputerName API under VB6 and Windows XP...
Private Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
Private Sub Command1_Click()
Dim retVal As Long
retVal = SetComputerName(Text1.Text)
This changes the computer name that is seen under the ctrl-alt-del (You're logged on computername/username) but when you go into the My Computer properties and select "Computer Name" tab, it shows the OLD computer name, not the new one. This creates a very serious problem when trying to add these machines to a domain, as the network name they report to WINS is based on THIS name, not the other name.
So, I need a new method of changing the computer name that actually changes the computer name everywhere, not just in a few places.
I will add 100 points to this question (200 total) if this is resolved within two hours of posting (11:30 am PST now.) Not that it matters, but a bonus is always nice.
Also note that I'm searching the web furiously to find a fix, please forgive me if I find one externally and thus no longer need this question.
Thank you for your help.