VB Code:
  1. Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
  2.  
  3. Dim strNewComputerName as string
  4.  
  5. Dim lngReturn as Long
  6.  
  7. strNewComputerName = "Speedy's system"
  8.  
  9. lngReturn = SetComputerName(strNewComputerName)