Jump to content
Macro Express Forums

Autorun


Rick T

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...