FLoOnYToOn Posted April 11, 2017 Share Posted April 11, 2017 Right, so first off, I've been writing scripts for the rubber ducky to deliver a program that will be stored on the USB. There have been other threads about this but I think that was in relation to another issue. My issue is that I need a (preferrably simple) script that would use CMD to find the Drive Letter for the Rubber Ducky and copy it to the clipboard. For instance, the beginning of my script begins with waiting 15 seconds on the off chance that auto opens, from which I can copy the address bar to get the Drive Letter. Honestly i've spent days trying to figure this out (sorry I'm quite new to coding) any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
ThoughtfulDev Posted April 11, 2017 Share Posted April 11, 2017 (edited) for /f %d in ('wmic volume get driveletter^, label^|findstr "DUCKY"') do @set duck=%d This cmd line will save the ducky drive letter to the varibale "duck" (your drive should be labeled DUCKY). Dont know about the clipboard part though... Edited April 11, 2017 by ThoughtfulDev Quote Link to comment Share on other sites More sharing options...
FLoOnYToOn Posted April 12, 2017 Author Share Posted April 12, 2017 On 4/11/2017 at 9:28 PM, ThoughtfulDev said: for /f %d in ('wmic volume get driveletter^, label^|findstr "DUCKY"') do @set duck=%d This cmd line will save the ducky drive letter to the varibale "duck" (your drive should be labeled DUCKY). Dont know about the clipboard part though... Thanks man! I appreciate the help, I was getting really lost at first but this is giving me a lot of direction, cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.