05-06-2021 08:31 PM
I am having a problem. I have a LabVIEW application that does many automated test and programming tasks on a product. On of the programming tasks is to copy an image file into a SOM that has an imx6 processor. To accomplish this, the processor is placed into a mode where it appears as a USB drive on Windows, This all works and LabVIEW can then call a c CLI using the sys exec VI to send the image file to the apparent USB drive. However, when the apparent USB drive open, Windows display the usual messages about what shall it do with the drive, etc.. All of these massaged appear under the explorer.exe task. I want to close them all from LabVIEW. SO:
1. I can wait until the system is programmed, then open a command prompt (not the sys exec)
2. I can type into the command prompt, taskkill /F /IM exporer.exe && explorer.exe
This works. Note than if I do not use the /F then the messages do not close. With the /F all the little windows messages close up and my PC continues to work normally.
If I send the same command using the LabVIEW sys exec, the Windows messages close, but I am left with a black screen with only LabVIEW visible and working. Nothing else is on the screen. I must then reboot my PC to get things back to normal.
I have seen ides based on bring the explorer.exe window to the front and then attempting to press the Cancel button programmatically, but it does not work, and I am not sure how to pick which button to push as I cannot set the focus on the Windows message.
Any ideas?
Thanks,
Sid Levingston
05-06-2021 11:30 PM - edited 05-06-2021 11:32 PM
Set "Auto Play" to "Do Nothing" when a USB drive is inserted.
https://www.windowscentral.com/how-configure-autoplay-windows-10
05-07-2021 11:38 AM
Thank you. This works. I will now see if there is a wat to do this form my LabVIEW program. I am thinking I can use the registry edit VIS to accomplish the same thing, then I can put things back when the program is finished.
11-21-2023 04:50 PM
Just attach a simple VLC.vi in case someone needs it.
11-22-2023 04:49 AM
Hi yuntan,
@yuntan wrote:
Just attach a simple VLC.vi in case someone needs it.
You know you forgot to attach that VI? All we got is an image…