Subject |
Re: Computer serial number |
From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
Date |
Fri, 19 Apr 2024 09:37:55 +0530 |
Newsgroups |
dbase.getting-started |
Good Morning Rachhpal,
> How I can store serial number in memory variable?
> Following command is used
>
> C:\>wmic bios get serialnumber
There is a routine in duflp runhidden() It is part of miscapi.?? I think.
It will run any dos command without showing a window.
runhidden("wmic bios get serialnumber >serial.txt")
The above line will store the serial number generated in serial.txt
From there it can be retrieved using the file object as serial.txt will
be a simple text file.
runhidden("wmic bios get serialnumber >serial.txt")
sleep(1) //So that the above command has finished executing before we
try another command
f = new file()
f.open("serial.txt")
mserial = f.gets()
f.close()
The above code is untested but should complete the job with some
modifications.
Regards
Akshat
|
|