how to run python file in when windows startup

C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Content of run_script.cmd

python path\to\your\script.py

Here is what the above code is Doing:
1. It’s creating a batch file named run_script.cmd in the startup directory.
2. It’s adding a line to the batch file that will run your Python script.
3. It’s making the batch file executable.
4. It’s scheduling the batch file to run every time you log in.

If you want to remove your script from the startup directory, simply delete the batch file.