Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
keywords: Intcontrol 76 rename computer name computername set change
#DefineFunction SetComputerName(computername) ;This function is designed for Windows 2000/XP/2003 ;It is a workaround for a problem with IntControl 76 ;not setting the DNSHostName if WinVersion(1) < 5 Message("Error","This function is not supported on the platform") Return(0) endif dllname = StrCat(DirWindows(1),"Kernel32.dll") ret = DllCall(dllname, long:"SetComputerNameExA", long:5, lpstr:computername) if ret == 0 Message("Error",DllLastError()) Return(ret) endif return(1) #EndFunction ret = SetComputerName("OTIS") if ret == 0 Message("Error","Unable to set computer name") Exit endif Exit
Article ID: W16734
File Created: 2005:02:18:12:22:06
Last Updated: 2005:02:18:12:22:06