Hello,
I'm newbie to use WMI scripting but I'm tring to use Win32_UserAccount
method.
Some of it properties are read/write and I don't know how to modify it
!!!
In fact, I would like to modify the fullname of a user per example.
I can get all information with that :
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_UserAccount WHERE Name='rhildt'", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly)
And I try to modify with an update sql command :
Set colItems = objWMIService.ExecQuery("Update Win32_UserAccount SET
Fullname='Toto' WHERE Name='rhildt'")
But no error message and no change.
I looked on the microsoft documantation :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_useraccount.asp
Fullname is a read/write property but no method to modify it and no
explaination.
Somebody can help me ???
Thanks a lot and sorry for my english (I'm french)
Romain