>LOCAL answer >oldcname = ALLTRIM(THISFORM.txtoLD.VALUE) >newcname = ALLTRIM(THISFORM.txtNew.VALUE) > >IF oldcname != newcname > answer=MESSAGEBOX("Your computer is called " +oldcname +CHR(10) +CHR(13); > +"Are you sure you want to" +CHR(10)+CHR(13); > +"change it to " +newcname,3,"Confirm Computer name change") >*Write back the computer name here - goto new method > DO CASE > CASE answer = 2 &&& Cancel >*go back to page > CASE answer = 6 &&& Yes >*change the computer name here >suspend > lcComputer = "." > loWMIService = GETOBJECT("winmgmts:" ; > + "{impersonationLevel=impersonate}!\\" + lcComputer + "\root\cimv2") > colComputers = loWMIService.ExecQuery ; > ("Select * from Win32_ComputerSystem") > FOR EACH loComputer IN colComputers > loComputer.RENAME(ALLTRIM(THISFORM.txtNew.Value)) > NEXT > > test = GETENV("COMPUTERNAME") > CASE answer = 7 &&& No > THISFORM.RELEASE() > CLEAR EVENTS > ENDCASE > >ENDIF >>HOWEVER THIS DOESN'T WORK WHAT HAVE I MISSED ?