Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Thumb drive image  (Read 5909 times)

0 Members and 1 Guest are viewing this topic.

godsstigma

    Topic Starter


    Rookie

    Thumb drive image
    « on: October 22, 2008, 07:53:20 AM »
    Does anyone know of a utility that will automatically take an image of a thumb drive when inserted into a USB port?

    I want to know the contents of someones thumb drive without them knowing when they connect it to my PC.

    Thanks.

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Thumb drive image
    « Reply #1 on: October 22, 2008, 08:29:58 AM »
    Using TweakUI (My Computer==>Autoplay==>Handlers) you can build your own handler.  Edit one of the existing handlers to use as a guide.

    TweakUI

    Good luck.  8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    godsstigma

      Topic Starter


      Rookie

      Re: Thumb drive image
      « Reply #2 on: October 22, 2008, 09:15:37 AM »
      Thanks sidewinder... I figured I could do something to that effect.

      But do you know of a utility that will take an image extremely quick and in the background?
      If when they connect the thumb drive they see an application running, they will undoubtedly pop it out.... I would.

      Thanks for the response.

      Sidewinder



        Guru

        Thanked: 139
      • Experience: Familiar
      • OS: Windows 10
      Re: Thumb drive image
      « Reply #3 on: October 22, 2008, 11:56:06 AM »
      The nice thing about Windows script is you can monitor almost anything that happens in your PC.

      Code: [Select]
      On Error Resume Next
      strComputer = "."

      Set WshShell = CreateObject("WScript.Shell")
      Set fso = CreateObject("Scripting.FileSystemObject")

      Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
      Set objEventSource = objWMIService.ExecNotificationQuery _
          ("SELECT * FROM __InstanceOperationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_LogicalDisk'")

      Do While True
          Set objEventObject = objEventSource.NextEvent()
          If objEventObject.TargetInstance.DriveType = 2 Then
            Set usb = fso.GetDrive(objEventObject.TargetInstance.DeviceId)
            If usb.IsReady Then WshShell.Run "%comspec% /k dir " & usb
          End If
      Loop

      Save the script with a vbs extension and run from a command prompt as cscript scriptname.vbs

      Notes:
      1. The directory list runs in a separate window but remains on screen
      2. While the script can be killed with CTL-C, a command window will be tied up for the duration.

      Good luck.  8)
      « Last Edit: October 22, 2008, 02:17:31 PM by Sidewinder »
      The true sign of intelligence is not knowledge but imagination.

      -- Albert Einstein

      godsstigma

        Topic Starter


        Rookie

        Re: Thumb drive image
        « Reply #4 on: October 23, 2008, 03:14:54 PM »
        I guess i need to learn about scripting. (actually looking into it now)

        But in the mean time, what will this script actually do?

        Sidewinder



          Guru

          Thanked: 139
        • Experience: Familiar
        • OS: Windows 10
        Re: Thumb drive image
        « Reply #5 on: October 23, 2008, 04:03:57 PM »
        Quote
        But in the mean time, what will this script actually do?

        Beats me. ??? I just thought you would really be impressed ;D

        Actually, the script waits for a logical disk to be added to the system. Then it pounces into action, filters the type of drive and if it determines it's a removable drive, runs a directory listing. The script runs continuously in a command window. It can be killed with CTL-C or by closing the window (man, I should write fiction!).

        I interpreted image to mean a directory listing but that can be changed to take any number of actions.

        Sometimes when you can't find exactly what you need, building your own is the way to go.  8)

        Note: I could not test a floppy drive, CD/DVD will not trigger a directory listing, USB will.
        The true sign of intelligence is not knowledge but imagination.

        -- Albert Einstein

        godsstigma

          Topic Starter


          Rookie

          Re: Thumb drive image
          « Reply #6 on: October 23, 2008, 08:13:08 PM »
          HA!
          I was really impressed. :)

          Thanks for the script it will come in handy.

          How hard would it be to write a script to automatically copy the contents of the thumb drive onto my HDD while hidden in the background?
          Obviously i have no experience with scripting, so would this be an easy jumping off point for me or am i trying to take too much of a bite?

          Carbon Dudeoxide

          • Global Moderator

          • Mastermind
          • Thanked: 169
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Experience: Guru
          • OS: Mac OS
          Re: Thumb drive image
          « Reply #7 on: October 23, 2008, 10:14:50 PM »
          Quote
          I want to know the contents of someones thumb drive without them knowing when they connect it to my PC.
          Personally, I would like to know why.... ::)

          mroilfield



            Mentor
          • Thanked: 42
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Experienced
          • OS: Windows 11
          Re: Thumb drive image
          « Reply #8 on: October 24, 2008, 06:15:25 AM »
          I am with Carbon on liking to know why. The way I look at is that if some one connects their thumb drive to my PC then I have every right to know what is on it and will let them know this with out trying to sneak the info off of the drive.
          You can't fix Stupid!!!

          patio

          • Moderator


          • Genius
          • Maud' Dib
          • Thanked: 1769
            • Yes
          • Experience: Beginner
          • OS: Windows 7
          Re: Thumb drive image
          « Reply #9 on: October 24, 2008, 07:05:22 AM »
          Then password protect your thumd drives...problem solved.
          " Anyone who goes to a psychiatrist should have his head examined. "

          godsstigma

            Topic Starter


            Rookie

            Re: Thumb drive image
            « Reply #10 on: October 24, 2008, 08:22:05 AM »
            Well honestly it is a personal matter, but it basically involves my extremely stupid aunt’s boyfriend who is a convicted child molester getting on a family member’s computer. I saw him connect his thumb drive to the computer, upload a file then quickly disconnect and place in his pocket. I wish to know what the *censored* he has on that thing.

            I have already said too much, as I don’t wish to bring any drama to this thread.

            mroilfield



              Mentor
            • Thanked: 42
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Experienced
            • OS: Windows 11
            Re: Thumb drive image
            « Reply #11 on: October 24, 2008, 08:37:26 AM »
            Well when I am using some one's comp and need something off or put some thing on my thumb drive I will do the same thing he did and upload what I need then quickly disconnect it and put it back in my pocket. This way I don't forget the drive.

            It sounds to me like you might be a little paranoid and judging everything he does on his past. Have you asked him what is on the drive.
            You can't fix Stupid!!!

            Spoiler



              Specialist

              Thanked: 50
            • Experience: Beginner
            • OS: Windows XP
            Re: Thumb drive image
            « Reply #12 on: October 24, 2008, 12:09:58 PM »
            To me it sounds like you may have a good reason to copy the thumb drive....or not. I would password my PC and not let him in it. If he is downloading bad files and someone tracks it back to your machine they are not really going to buy in to "But I didn't do it!"

            Stop it in its tracks and just don't let him on the machine...or if you do watch him like a hawk!
            Whenever I watch TV and I see those poor starving kids all over the world, I can't help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff." - Mariah Carey, Pop Singer

            Sidewinder



              Guru

              Thanked: 139
            • Experience: Familiar
            • OS: Windows 10
            Re: Thumb drive image
            « Reply #13 on: October 24, 2008, 01:06:36 PM »
            I'm amazed how a little innocuous script about a directory listing has spiked the paranoia level around this post. It's almost Orwellian around here.

            Quote
            How hard would it be to write a script to automatically copy the contents of the thumb drive onto my HDD while hidden in the background?
            Obviously i have no experience with scripting, so would this be an easy jumping off point for me or am i trying to take too much of a bite?

            Using the posted script as your starting point, it would be very easy to copy the files from the thumb drive. Check out the Shell.Application and the CopyHere method. Your code should run when usb.isReady

            Good luck.  8)
            The true sign of intelligence is not knowledge but imagination.

            -- Albert Einstein