members please help pendrive entry in registry not showing date in vbscript.
my code is as follow :
Dim oNetwork
Set oNetwork = CreateObject("WScript.Network")
Dim sLocal
sLocal = oNetwork.ComputerName
Dim oFSO, oTS
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.CreateTextFile("" & _
sLocal & ".txt")
On Error Resume Next
Dim strComputer
Dim objWMIService
Dim colItems
oTS.WriteLine "USB DETAILS"
oTS.WriteLine ".............................................."
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Enum\USBSTOR"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
oTS.WriteLine subkey
Next
the output is as follows :
USB DETAILS
..............................................
Disk&Ven_Generic&Prod_Flash_Disk&Rev_8.00
Disk&Ven_Hisun&Prod_Flash_Disk&Rev_2.80
Disk&Ven_JetFlash&Prod_Transcend_2GB&Rev_8.07
Disk&Ven_JetFlash&Prod_Transcend_4GB&Rev_8.07
Disk&Ven_Kingston&Prod_DataTraveler_120&Rev_1.00
I want to get the time of the pendrive inserted.... or if any member can export the registry key that can also help ..................please............help