Rick T Posted December 24, 2007 Report Share Posted December 24, 2007 Hi guys, I'm trying to accomplish one of two things with Macro Express and Windows XP. Either: 1) Launch a macro on the hard drive when a USB pen drive is inserted. or 2) Launch a playable macro (stored on a USB pen drive) when it is inserted. I'm completely stumped by this and have tried all sorts with .inf files etc. The only way that I can get it to work is with the 'options' window that appears when a pen drive is plugged in. But for reliability with different PCs, I'd like to try and get it to work with this option turned off. I'm looking forward to hearing of possible solutions and wish all members a very happy Christmas. Rick T Quote Link to comment Share on other sites More sharing options...
kevin Posted December 27, 2007 Report Share Posted December 27, 2007 The Autorun.inf file allows you to run applications, including macros, when a USB device is plugged in. However, Microsoft does not allow the autorun.inf to run silently when the USB device is plugged in. Windows always displays a menu of possible actions. You can add an action to the list of actions on the USB drive's menu. The action you add is listed at the top and is the default action. So the user can plug in the USB device and click the OK button (or press the Enter key) to run your macro. To launch a playable macro create autorun.inf containing the following and place it on your USB drive: [autorun] action=Run USB Autorun Test macro shellexecute=USBAutorunTest.mxe icon=<your icon>.ico In this case the playable macro 'USBAutorunTest.mxe' is saved on the USB drive itself. To launch a macro create autorun.inf containing the following and place it on your USB drive: [autorun] action=Run USB Autorun Test macro open=c:\Program Files\Macro Express3\meproc.exe /AUSB Autorun Test icon=<your icon>.ico If Macro Express 3 is installed in a different directory you will need to adjust the 'open' statement. Change the name of the macro to run by entering the name of your macro after /A in the 'open' statement. In either sample, you can specify an icon to be displayed in the USB device's action list. If you specify something like macexp.ico then you will need to copy a macexp.ico file to the USB drive. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.