? GETENV("COMPUTERNAME")Or this (requires Windows Scripting and I cannot test it in '95)
lcComputer = "." loWMIService = GetObject("winmgmts:" ; + "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2") colComputers = loWMIService.ExecQuery ; ("Select * from Win32_ComputerSystem") For Each loComputer in colComputers MESSAGEBOX('Computer Name:' +loComputer.Name) NextAnd to rename
lcComputer = "." loWMIService = GetObject("winmgmts:" ; + "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2") colComputers = loWMIService.ExecQuery ; ("Select * from Win32_ComputerSystem") For Each loComputer in colComputers loComputer.Rename("Computer 2") Next>is there another way other than that stated in "RE: Ipconfig? Ipaddress, subnet & Def' Gateway" to retreve the computer name and again how would I change it without asking my customers to right click on "My Computer", "Computer name" etc etc I also needed it to apply to windows 95, 98, ME, 2K and XP.... Any ideas any one ?