Subject Re: Computer serial number
From RACHHPAL S GILL <rachhpalg@yahoo.com>
Date Sat, 20 Apr 2024 00:05:16 -0400
Newsgroups dbase.getting-started

Thanks everybody.
The following code works but when it displays the serial number every digit has space in between.
///////////
run("wmic bios get serialnumber > c:\temp\serial_no.txt")
f = new file()
f.open("c:\temp\serial_no.txt")
mserial_head = f.gets()                        // first line in text file is heading "Serial number"
mserial_no = f.gets()
f.close()
clear
? mserial_head
? mserial_no

/////////
Ken Mayer Wrote:

> On 4/19/2024 10:14 AM, RACHHPAL S GILL wrote:
> > Thanks Akshat
> > The command works but could not find serial.txt file
>
> Try adding a full path to the file:
>
> // if you have a folder on the C: drive named "temp", for example:
> runhidden("wmic bios get serialnumber > c:\temp\serial.txt")
>
> // and change that here, as well in Akshat's code:
> f.open("c:\temp\serial.txt")
>
> Ken
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
> dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
> dBASE DOS to Windows Tutorial:
> http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
>