pendrive entry in registry not showing date in vbscript Help ???????????

Author Message
B00sam

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 3/22/2011
  • Status: offline
pendrive entry in registry not showing date in vbscript Help ??????????? Monday, November 21, 2011 3:22 PM (permalink)
0
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
 
#1
    rasimmer

    • Total Posts : 2363
    • Scores: 163
    • Reward points : 0
    • Joined: 3/19/2009
    • Location: Cedar Rapids, IA
    • Status: offline
    Re:pendrive entry in registry not showing date in vbscript Help ??????????? Tuesday, November 22, 2011 2:58 AM (permalink)
    0
    Where are you seeing this information in the registry? I don't see any date\time entries in my USBStor key or subkeys.  IF you do a web search it seems to be a big complaint that there is no USB auditting anywhere in Windows.  Maybe another members google FU is stronger than mine.
     
    #2
      B00sam

      • Total Posts : 2
      • Scores: 0
      • Reward points : 0
      • Joined: 3/22/2011
      • Status: offline
      Re:pendrive entry in registry not showing date in vbscript Help ??????????? Tuesday, November 22, 2011 4:08 PM (permalink)
      0
      OK rasimmer that means you are not knowing this ......
      step 1. go to the desired key.
      step2. right click on the key and export
      step3. save this as txt and you will not only found when pendrive was inserted but also the last access time of pendrive.
      thanks members can anyone please tell some code to export registry key ........
      rasimmer you can copy my code and save as .vbs and click it , it will make a txt file with your computer name and the pendrive you have used ...... please check...
      thanks you in advance.............
      <message edited by B00sam on Tuesday, November 22, 2011 4:11 PM>
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9