[SOLVED] How to stop raspberry pi pico from opening Windows File Explorer when it's plugged in ?

addixkmac

Reputable
Jan 12, 2019
40
1
4,535
Hi I'm working on a Pico project that the board will be treated as a HID device keyboard.

I'm writing my automation in micro python if that matters. what I want is when plugging into a windows device (or any OS for that matter) not open up file explorer.

This Pico will be be plugged-in mass amount of devices so if its a setting that needs to be changed in each computer in Windows that would not really work :(

any suggestions would help.

Thanks!
 
Solution
How are you connecting your device? USB connection I expect?

And when you plug in your board then you simply want it to act as a keyboard - correct?

Not really sure about your project and also (full disclosure) going way outside of my comfort zone.

However; being curious, I did a bit of research (aka googling) and found a few links that may be applicable.

Here are two of them:

https://www.programcreek.com/python/example/115559/hid.device

https://answers.microsoft.com/en-us...e-screen/755d6416-b237-44b2-b63e-db1942305941

Since you cannot control how the targeted computer may respond (e.g., opening File Explorer) your micro python code will likely need to...

Ralston18

Titan
Moderator
How are you connecting your device? USB connection I expect?

And when you plug in your board then you simply want it to act as a keyboard - correct?

Not really sure about your project and also (full disclosure) going way outside of my comfort zone.

However; being curious, I did a bit of research (aka googling) and found a few links that may be applicable.

Here are two of them:

https://www.programcreek.com/python/example/115559/hid.device

https://answers.microsoft.com/en-us...e-screen/755d6416-b237-44b2-b63e-db1942305941

Since you cannot control how the targeted computer may respond (e.g., opening File Explorer) your micro python code will likely need to detect that opening. Then send the necessary keyboard keystrokes to close File Explorer on the targeted computer.
 
Solution

Pied Piper

Reputable
Jul 13, 2019
17
1
4,515
I'm not seeing that here, on my Windows 10 desktop PC. If its setup / flashed for Micro Python it shouldn't be detected as a drive unless you hold down the Boot Select Button. Mine was flashed with the Pimoroni Micro Python uf2 file, which is just a modified version of the Pi foundation Micro Python uf2 file.
I do believe it shows up as a mass storage device if flashed with Circuit python though.