wmic csproduct get UUID using System; using System.Management; class Program { static void Main() { // WMI¸¦ »ç¿ëÇÏ¿© ÄÄÇ»ÅÍÀÇ °íÀ¯ ½Äº°ÀÚ °¡Á®¿À±â ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystemProduct"); foreach (ManagementObject obj in searcher.Get()) { string uniqueId = obj["UUID"].ToString(); Console.WriteLine($"À¯ÀÏÇÑ ½Äº°ÀÚ (UUID): {uniqueId}"); } } } import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class UniqueIdentifierExample { public static void main(String[] args) { try { Process process = Runtime.getRuntime().exec("wmic csproduct get UUID"); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line; while ((line = reader.readLine()) != null) { if (!line.trim().isEmpty()) { System.out.println("À¯ÀÏÇÑ ½Äº°ÀÚ (UUID): " + line.trim()); } } } catch (IOException e) { e.printStackTrace(); } } } #include #include #include #include // CPUÀÇ ½Ã¸®¾ó ¹øÈ£¸¦ ¾ò´Â ÇÔ¼ö void getCPUSerialNumber(std::string& serialNumber) { int cpuInfo[4] = { 0 }; __cpuid(cpuInfo, 1); serialNumber = std::to_string(cpuInfo[3]) + std::to_string(cpuInfo[0]); } // MAC ÁÖ¼Ò¸¦ ¾ò´Â ÇÔ¼ö void getMACAddress(std::string& macAddress) { IP_ADAPTER_INFO adapterInfo[32]; DWORD bufferSize = sizeof(adapterInfo); DWORD status = GetAdaptersInfo(adapterInfo, &bufferSize); if (status == ERROR_SUCCESS) { macAddress = adapterInfo[0].Address; } } int main() { std::string cpuSerialNumber; getCPUSerialNumber(cpuSerialNumber); std::cout << "CPU ½Ã¸®¾ó ¹øÈ£: " << cpuSerialNumber << std::endl; std::string macAddress; getMACAddress(macAddress); std::cout << "MAC ÁÖ¼Ò: " << macAddress << std::endl; return 0; } #include #pragma hdrstop #include #include #include #include #include #pragma argsused int _tmain(int argc, _TCHAR* argv[]) { try { // WMI¸¦ »ç¿ëÇÏ¿© ÄÄÇ»ÅÍÀÇ °íÀ¯ ½Äº°ÀÚ °¡Á®¿À±â TVarRec args[1]; args[0] = Variant(L"UUID"); Variant result = ExecCmdProcess(L"wmic", L"csproduct get %s", args, 1); ShowMessage(L"À¯ÀÏÇÑ ½Äº°ÀÚ (UUID): " + result); } catch (Exception &exception) { Application->ShowException(&exception); } return 0; } #include #include #include #pragma hdrstop // À©µµ¿ì ÄÄÇ»ÅÍÀÇ °íÀ¯ ½Äº°ÀÚ¸¦ °¡Á®¿À´Â ÇÔ¼ö std::string getComputerUUID() { TGUID guid; guid = System::Sysutils::CreateGUID(); std::wstring uuid = System::Sysutils::GUIDToString(guid).c_bstr(); return std::string(uuid.begin(), uuid.end()); } int main() { try { std::string uuid = getComputerUUID(); std::cout << "À¯ÀÏÇÑ ½Äº°ÀÚ (UUID): " << uuid << std::endl; } catch (Exception &exception) { Application->ShowException(&exception); } return 0; } ManagementObjectSearcher theSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive WHERE InterfaceType='USB'"); foreach (ManagementObject currentObject in theSearcher.Get()) { ManagementObject theSerialNumberObjectQuery = new ManagementObject("Win32_PhysicalMedia.Tag='" + currentObject["DeviceID"] + "'"); MessageBox.Show(theSerialNumberObjectQuery["SerialNumber"].ToString()); }