I want my python file (Stored in my USB drive) to run automatically when USB is connected to my pc
I have tried this
[autorun]
open = MyFiles.py
saved it as "autorun.inf"
But it's not working at all
This is not possible on any modern OS. This is due to security concerns. Thus, Autorun is no longer a possibility in Windows. The only way to automatically execute stuff on Windows/Linux/MacOS is to change the registry key on Windows or use a Rubber Ducky.