Prevent Application From Launching at All if a Hard Drive Is Not Connected

Hi there,

I have partly achieved the above, by asking KM to check if the usb drive is connected, and accordingly quit the specific application (if the drive is not there). However, the application is still launching for a few (mili)seconds which means it has already detected that the required hard disk drive is not there and have since automatically adjusted certain settings.

Is there any way that I can set KM to check the usb drive BEFORE even launching the application, instead of quitting it?


What triggers the launch of the application? If you can replace that with running the macro then you can perform the check and start the application if the drive is connected.


Brilliant! Can I somehow create a shortcut on desktop (Mac) that would activate the macro?

Select the macro in the Keyboard Maestro Editor, then use File > Export As Trigger File to create a shortcut-style file.


Brilliant - thank you!

As a thought. Would it make sense to store on the hard drive itself? I do that with my steam library and Can’t even open steam unless the hard drive is attached.

1 Like