Subject Re: Computer serial number
From RACHHPAL S GILL <rachhpalg@yahoo.com>
Date Fri, 19 Apr 2024 13:14:13 -0400
Newsgroups dbase.getting-started

Thanks Akshat
The command works but could not find serial.txt file

Akshat Kapoor Wrote:

> 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