I've been able to retrieve my system serial number, but how do I pass the serial number itself into a variable?
int main()
{
char newSerial;
int (*ptr) (const char[]);
ptr = system;
ptr("wmic bios get serialnumber");
}
After running my code, the screen displays:
SerialNumber
xxxxxxxxxxxxx
exactly like this. But what I want is to pass just the "x's" into a char variable since it has a dash in it. Where exactly is the program calling the serial number from? Any suggestions? (Windows 7 x64)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…