Re: Perform an action when a specific USB device is attached?
Posted: Thu Feb 24, 2022 3:56 pm
Hey jak64,
as I wrote the othe day, I liked the solutions and ideas of the others....
Because I don't think we can help you with your problem otherwise. The operating system doesn't allow it. (my state of affairs)
Nevertheless here is some more information about the topic.
If you tried out the AutoRun and AutoPlay search, you probably found some information like this:
For security reasons, programs can no longer be started automatically from a USB stick via AutoRun.inf under the default settings as of Windows 7. With tools like 'AutoRunnerX' you can nevertheless command your USB stick to start a program immediately after the stick has been connected.
The mode of AutoRunnerX's:operation corresponds to that of the above examples.
In my opinion a usb stick will behave exactly the same as an attached hard disk.
The AutoRun.inf is the configuration stuff, which works on older windows. eg Windows XP
Autorun.inf for USB stick
# first save a text fle on the USB stick under the name "Autorun.inf".
# open the Autorun file on your USB stick again with a text editor.
# Add the line "open=exampleprogram.exe" without quotes.
So here the program exampleprogram would be executed.
The associated exe file must be on the stick for this.
# If you want to see your own image instead of the usual drive icon, add "icon=image.ico" to the next line.
The image must also be stored on the USB carrier.
# You change the name of the data carrier by adding "label=name".
Maybe you can change settings with SetACL and Registry Permissions so that it also works under new windows versions, probably at the expense of security. But I will not go into this further, because I have even less knowledge about it.
And also antivirus programs restrict the use of autorun and autoplay.
Okay, and one last tip:
To open the autoplay settings just enter the following clsid code in the run dialog (WIN+R).
shell:::{9C60DE1E-E5FC-40f4-A487-460851A8D915}
Good luck.
as I wrote the othe day, I liked the solutions and ideas of the others....
Because I don't think we can help you with your problem otherwise. The operating system doesn't allow it. (my state of affairs)
Nevertheless here is some more information about the topic.
If you tried out the AutoRun and AutoPlay search, you probably found some information like this:
For security reasons, programs can no longer be started automatically from a USB stick via AutoRun.inf under the default settings as of Windows 7. With tools like 'AutoRunnerX' you can nevertheless command your USB stick to start a program immediately after the stick has been connected.
The mode of AutoRunnerX's:operation corresponds to that of the above examples.
In my opinion a usb stick will behave exactly the same as an attached hard disk.
The AutoRun.inf is the configuration stuff, which works on older windows. eg Windows XP
Autorun.inf for USB stick
# first save a text fle on the USB stick under the name "Autorun.inf".
# open the Autorun file on your USB stick again with a text editor.
# Add the line "open=exampleprogram.exe" without quotes.
So here the program exampleprogram would be executed.
The associated exe file must be on the stick for this.
# If you want to see your own image instead of the usual drive icon, add "icon=image.ico" to the next line.
The image must also be stored on the USB carrier.
# You change the name of the data carrier by adding "label=name".
Maybe you can change settings with SetACL and Registry Permissions so that it also works under new windows versions, probably at the expense of security. But I will not go into this further, because I have even less knowledge about it.
And also antivirus programs restrict the use of autorun and autoplay.
Okay, and one last tip:
To open the autoplay settings just enter the following clsid code in the run dialog (WIN+R).
shell:::{9C60DE1E-E5FC-40f4-A487-460851A8D915}
Good luck.