Bonjour,
How can i detect windows 11 whith :
os_name = System.GetOSName()
os name return is always win 10
Thanks a lot
How can i detect windows 11 whith :
os_name = System.GetOSName()
os name return is always win 10
Thanks a lot
-- Generated by ScriptOMatic Tool for AutoPlay Media Studio function Escape(v) if (v == nil) then return ""; end if (type(v) == "table") then return Table.Concat(v, ", "); end if (type(v) == "boolean") then if (v == true) then return "Yes"; else return "No"; end end return v; end local sOutput = ""; local sOutputTitle = "Computer: localhost\r\n===================================== =====\r\n\r\n"; local oWMIService = luacom.GetObject("winmgmts:\\\\localhost\\root\\CI MV2"); local oColItems = oWMIService:ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", 48); if oColItems then local oEnum = luacom.GetEnumerator(oColItems); local oItem = oEnum:Next(); while oItem do sOutput = sOutput .. "Caption: " .. Escape(oItem:Caption()) .. "\r\n"; Label.SetText("Label1", sOutput); if (Dialog.Message("WMI Output", sOutputTitle .. sOutput, 1) == 2) then break; end sOutput = ""; oItem = oEnum:Next(); end else Dialog.Message("WMI Output", "No WMI Objects Found for class: Win32_OperatingSystem"); end
Comment