You are here

Autorun

2 posts / 0 new
Last post
Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Autorun

now I know that its impossible to autorun off a usb
but can any programs do this?
----
R McCue
@John please answer my post on the beta testing forums

Deuce
Offline
Last seen: 14 years 1 month ago
Developer
Joined: 2005-12-24 16:32
Autorun is not impossible,

Here is the directions to allow you to create an autoplay action to autorun any program on plugin:(Includes Example registry file needed)

---------------------------------------------------------------------------------------------------------------------------
-------------------------------------------USB Autoplay Handler------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------

*****What is USB Autoplay Handler?*****

This is a way to create a autoplay handler for USB devices within Windows XP. It allows the user to create an autoplay
option for any program residing on a USB Device or other removable drive. I have included the instructions and necessary
registry entries below. Enjoy!

*****Some Problems to Consider, Nothing to Bad though :)*****

So far I have tried this on a number of Windows XP Machines and it works everytime. However, The following needs to be
considered:

1. You do need to have Administrator rights to import the entries to the registry, but After that though it will work
without admin rights.
2. The path the executable will have to be change before you enter it into the registry on a new machine, as the drive
will change. (NOTE: If any one can find an enviromental variable to allow windows to always find the USB Drive,
it would then not need to be changed. I am still looking into it)
3. You must have Autorun enable on the PC for this to work.

Other than the above I see no other problems.

*****Instructions for changing it for any system*****

Below is the registry file you need to create. (Just copy the code in between the Start and End lines)

To make it work for your system and program, follow the below steps:

1. In the second key, change the "Action" Setting, where it says "USB Portable Apps List" to the an action name
such as "Open Firefox".
2. Change the "Provider" Entry to the manufacturer of the program, such as "Firefox Browser".
3. In the third Key, change the "PStart (ISO)" to "(ProviderEntry) ISO", Place what you put in the provider above
in place of the (ProviderEntry). Make sure you put a space and ISO after the entry.
4. In the last key place the path to the executable of the program you want to start.
5. Save the file as a .reg file, and then double click on it to import it to your registry.
6. Plug in your USB drive and then go to "My Computer > USB Drive > Properties" then goto the the "AutoPlay" properties page
click the drop down list and select "Mixed Content" you should see your new entry there.
7. Check the "Select Action to perform" circle and then choose your entry. Choose "Apply" and then "OK" to close.
8. Now log of and back on. This will reload the registry with your new changes.
9. Unplug and then replug in your USB and the program should autostart.
10. Finished!!

::::::::::::::::::::::::::::::::::::::::::::::::Start Registry file::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\MixedContentOnArrival]
"USBStart"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\ShowPicturesOnArrival]
"USBStart"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival]
"USBStart"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\USBStart]
"Action"="USB Portable App List Start"
"DefaultIcon"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
53,00,48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,\
00,38,00,00,00
"InvokeProgID"="USBStart"
"InvokeVerb"="open"
"Provider"="PStart"

[HKEY_CLASSES_ROOT\USBStart]
@="PStart (ISO)"

[HKEY_CLASSES_ROOT\USBStart\DefaultIcon]
@="F:\\Apps\\PStart\\pstart.exe,1"

[HKEY_CLASSES_ROOT\USBStart\shell]

[HKEY_CLASSES_ROOT\USBStart\shell\open]

[HKEY_CLASSES_ROOT\USBStart\shell\open\command]
@="F:\\Apps\\PStart\\pstart.exe"

::::::::::::::::::::::::::::::::::::::::::::::::: End of Registry File:::::::::::::::::::::::::::::::::::::::::::::::::::::::

****Final Thoughts****

It is possible to change the icon of the autoplay handler by changing the "DefaultIcon" entry in the second Key. I have it
set to use the USB icon in the Shell32 file in the windows folder, as 99% chance it will be on any Windows XP system. If you
want to use another Icon, then chance the entry to a path to the icon. Just make sure you change that path as you would the
path the the executable on a new machine.

****************************************************************************************************************************

Created By Deuce199
Using Windows XP Professional
Tested on Windows XP Professional Systems

This should allow you do what you want without any programs to install..

Deuce199

Deuce
Portable Software: Just the beginning.

Topic locked