1.

Solve : Computername?

Answer» HELLO,

I WOULD like to know how to CHANGE the computer name USING MS DOS

Thank You

AlmnSorry , I meant in VScript

AlmnCode: [Select]strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colComputers = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")

For Each objComputer in colComputers
err = objComputer.Rename("newName")
Next

Change newName to something appropriate. You must reboot for the change to take effect. Works only on the local machine.

Curious: This script only works on the local machine, why not just do this manually thru the Properties of the My Computer icon?

8-)



Discussion

No Comment Found