How can I make windows execute a python script when a flash drive is plugged into the computer? Is there a way to do this with python or do I have to use windows?
mahela007 6 Posting Whiz in Training
Recommended Answers
Jump to PostPortable Python installs a portable version of Python right on your USB flash drive (plan on 150MB for each version). You can use the flash drive now on Windows computers that do not have Python installed. It comes in Python25, Python26 and Python30 flavors. See:
http://www.portablepython.com/releases/
Jump to PostYou misunderstood me. What I want is to run a python script /program that I have already written and is stored on the PC. Every time I plug the flash drive in , that script should be run automatically.
This would have to come from the Win API. You can …
Jump to PostThis would also likely require that your Python program run in the background as a service. It would need to monitor the presence of a USB flash drive and act accordingly when it detected one. There is information in this forum for setting up a service in Windows if you …
Jump to Postare you planning to make a virus ? ;)
Jump to PostHow would I have a python program running constantly?
If you are running windows you can just put your program in the 'startup' folder in your start menu and it will be started every time the computer turns on.
Though, if somehow the program quits, be that because of …
All 19 Replies
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
mahela007 6 Posting Whiz in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
jlm699 320 Veteran Poster
Stefano Mtangoo 455 Senior Poster
AutoPython 5 Junior Poster
mahela007 6 Posting Whiz in Training
snippsat 661 Master Poster
mahela007 6 Posting Whiz in Training
snippsat 661 Master Poster
mahela007 6 Posting Whiz in Training
AutoPython 5 Junior Poster
AutoPython 5 Junior Poster
mahela007 6 Posting Whiz in Training
AutoPython 5 Junior Poster
lllllIllIlllI 178 Veteran Poster
mahela007 6 Posting Whiz in Training
hondros 25 Junior Poster
mahela007 6 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.