3

I am writing a program in qt that will be installed on a flash drive. I need it to run on several operating systems as soon as it is plugged in. I was thinking I could do this by putting all of the different os compiles in separate folders and having the autorun for each os in the first part of the drive. Would this work? It is supposed to be somewhat like sandisks u3 in the fact that it pops up as soon as it is plugged in and runs off the drive.

a sandwhich
  • 4,352
  • 12
  • 41
  • 62
  • 2
    I didn't know that also other operating systems were so dumb to automatically run unknown code coming from an external source. I was actually thinking to propose MS to indemnify for all the damage that this dead stupid autorun idea did to the whole community. – 6502 Feb 19 '11 at 21:16
  • Well, I can easily turn on an autorun feature in ubuntu and fedora. Would you suggest any other method for achieving what I am trying to get to? This will only be run on my home computers, nowhere else, so it isn't like security is that big of a problem. – a sandwhich Feb 19 '11 at 21:20
  • @6502: MS removed the auto-autorun after Windows XP with a dialog box showing you the options. And of course, any code not running as administrator (should) pop up a consent dialog. – rubenvb Feb 19 '11 at 21:32

2 Answers2

5

It would certainly work - basically each autorun configuration file is OS specific, and you can specify exactly which executable to run on plug-in.

The Sandisk U3 platform is a rather devious trick around a typical Windows setting, which forbids autorun from a flash device, but allows it nonetheless on an CDrom drive. U3 device has two partitions, one of which (around 16MB) holds an ISO image, that, together with the special USB controller, gets recognized as an optical drive.

If you can get a hand on one of those drives, they can be reprogrammed to do anything else you want.

qdot
  • 6,195
  • 5
  • 44
  • 95
0

I had a friend that fixed an auto-sync script on his thumb drive.

On Windows it basically boils down to a single AutoRun.inf file.

On other platforms, I don't know. On Linux, it will probably depend on Desktop Environment and security settings.

rubenvb
  • 74,642
  • 33
  • 187
  • 332