Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running remotelly an application
Message
From
22/07/2003 15:33:56
 
 
To
22/07/2003 15:21:34
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00812342
Message ID:
00812507
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
hello Claudio

the following code was posted by someone here on UT, but i can not remember who it was (sorry to the developer).

this might help you get the serial from a remote HD. the idea is that you could (temporarly) map the remote drive, get the serial, and then unmap. ofcourse this will only work if something on the remote HD is shared.
******************
** 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
hope this helps
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform