Hi,
I'm in the process of making my 2 freeware play nicer with Vista.
At the moment, I'm using this code below to get the full name of the OS(ie."Windows XP professional Service Pack 2"). If I get an error, my error handler returns a .NULL. under Vista. I'm using my HTPC with "Vista Home Premium" and would like that value. How do you do that with Vista/VFP and still work in XP?
LOCAL lcComputerName, loWMI, lowmiWin32Objects, lowmiWin32Object
lcComputerName = GETWORDNUM(SYS(0),1)
loWMI = GETOBJECT("WinMgmts://" + lcComputerName)
lowmiWin32Objects = loWMI.InstancesOf("Win32_OperatingSystem")
FOR EACH lowmiWin32Object IN lowmiWin32Objects
WITH lowmiWin32Object
RETURN .Caption + " "+.CSDVersion
ENDWITH
ENDFOR
Thanks for your answers ;)