> >****************** >** zGetHDDSerial >** >** returns the last 6 digits of the HDD serial number. >LOCAL ; > lcCurDrive, ; > lcHDD, ; > lcValue1 > >lcCurDrive = SUBSTR(SYS(5),1,1) && return current hard drive letter 'c' >* *** for testing >*lcCurDrive = "f" > >** return the hard drive serial number >ofs = create('scripting.filesystemobject') >lcHDD = ALLTRIM(STR(abs(ofs.drives(lcCurDrive).serialnumber))) >** get the last 6 digits or pad with '0' if less than 6. >?lcHDD >IF LEN(lcHDD) < 6 > lcHDD = PADR(lcHDD,6,'0') >ELSE > lcHDD = UPPER(SUBSTR(lcHDD,(LEN(lcHDD)-5),6)) >ENDIF >?lcHDD >return lcHDD >It works fine with the letters F:,G: of our server.. But, If we do the same in other stations (maping the drive of other machines) it doesn't.. lcHDD returns 0 !