PDA

View Full Version : trigger action on card insertion/removal


V J
30th July 2007, 02:16 PM
Hello,

I'm using two microSD cards. Some programs are installed on both (and work regardless of which one is present in the device), some are only installed on one card. I don't need those programs at that time, but it leaves shortcuts to non-existing targets in the programs folder.

I wat thinking of ways for circumventing this (my Psion 5mx had a dynamic "programs folder", showing only the available programs at that particular time). Here is my idea: I can make MortScripts to copy the shortcuts from the start menu folder to another one (e.g. in my documents), and to copy them back to the start menu folder. But I need to start them manually.

Is there a way to trigger a script upon card removal (the script to remove shortcuts from the start menu folder)? And is there a way to trigger another script upon card insertion and execute a script on the card itself (if both cards have a script with the same name, this script could carry the appropriate action to copy relevant shortcuts to the start menu folder). Alternatively a script on the device should have to recognize which of the two cards is inserted (e.g. based on volume name) and execute the appropriate script - but I think executing something on the card is easier.

Any suggestions on how to automatically trigger this?
(I'd like to manage this with scripts / executables only, not develop my own software for this purpose)

Thanks!


Jörg

vijay555
1st August 2007, 04:16 PM
There is a notification event when the card is inserted/removed.

You can also use an autolaunching app to launch a script on the card itself, when inserted.

http://www.pocketpcdn.com/forum/viewtopic.php?t=334

V

V J
1st August 2007, 04:35 PM
Thank you!

In the thread, a user mentions a freeware autorun.exe redirector, but I
can't find it on the site he linked in his post
(http://www.pocketpctoolkit.com ).

Do you have it, or know of another autolaunching application?

Thanks again,


Jörg