Auto running a script in python
Question: I'm looking for a script that auto spams pictures of nicholas cage on the
desktop I have this script right now but what I want to do is make it
automatically run as soon as the USB is plugged in

    
    
     import shutil
     src = ('Kim.jpg')
     dst = ('H:/profile/desktop/Nic')
     count = 1
     while count < 10:
         shutil.copyfile(src, dst + str(count) + ".jpg")
         count += 1
    


Answer: **Assumption** : You are using Windows.

Almost on every new windows platform you need to approve an autorun of any
executable so no leads here. But here is an alternative using some
social/psychological engineering:

Convert your program to a standalone executable using a tool like `py2exe`. I
assume that after conversion your file is named `spammer.exe`. Then paste this
file in the USB and super-hide it by opening Command Prompt inside your USB
and typing:

    
    
    attrib +h +s +r spammer.exe  
    

Now create a shortcut with and icon of a typical folder of Windows and name it
something attractive (if you know what I mean) and point it to `spammer.exe`.
The user (in excitement) clicks at it and Kaboom!

