Open notepad and write
Save file as autorun.inf
Put this ‘autorun.inf’ and your actual .exe virus ‘anything.exe’ in the maybe pendrive.
When the victim plug inthe pen drive,the autorun.inf will launch anything.exe and commands in .exe file virus would execute.
Of course you can autorun other files like pictures (,jpg) or music (.mp3) or whatever file you want.