Afficher un message
Vieux 15/09/2007, 10h46   #2
bvb47 via WinServerKB.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: read disk serial number with .bat sript

Hello!, thanks

I can't use the wmic because the service is dissabled on my XP's network
(wmic logicaldisk where "deviceid='c:'" get volumeserialnumber)

I think that one easy way to know the serial number is doing someting like:

dir c: > file.txt
and now read the serial number from the file. But I don't know how can I do
this.
(read regular expression from file or from a pipe)

thanks

J Ford wrote:
>With the aide of WMIC...
>
>:/>wmic logicaldisk where drivetype=3 get name, freespace, systemname,
>filesystem, size, volumeserialnumber
>
>you can change the drivetype value:
>0 Unknown
>1 No Root Directory
>2 Removable Disk
>3 Local Disk
>4 Network Drive
>5 Compact Disc
>6 RAM Disk
>
>You can lookup win32_logicaldisk to get the other properties and methods
>
>
>> hello!,
>>

>[quoted text clipped - 3 lines]
>>
>> thanks


--
Message posted via WinServerKB.com
http://www.winserverkb.com/Uwe/Forum...pting/200709/1

  Réponse avec citation
 
Page generated in 0,04983 seconds with 9 queries