Cross platform autorun

980 views Asked by At

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.

2

There are 2 answers

0
qdot On BEST ANSWER

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.

0
rubenvb On

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.