-
Thank you for reading this message!
Is there a way to make an exe on a floppy disk and have it automatically run the exe when it is inserted into the drive(it is the same concept as placing a CD in its drive and running by itself).
PS: THIS IS NOT AN INSTALLATION!!!!
-
Hi,
I'm sorry but there is no way for this to work. It is impossible to make the floppy disk detect a disk being inserted.
-
You could make a program with a timer, that checks if there is a floppy disk in the drive, and if there is, execute a command on it.
In doing this, it would be very annoying having your floppy drive start chugging while in the middle of something.
In other words, it is not a good idea, and can't be done otherwise.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer
-
But if you put this program on the CD then it is possible. You would have to create an Autorun.inf file. Then put this ih that file:
[autorun]
OPEN=YourProgram.exe
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Also for a cd-rom you can make the cd have and icon by placing ICON=icon.ico in autorun.inf
-
You would also have to make sure the target machine has autorun enabled .... I don't know which reg key though...
Tom
-
The registry key depends on how many CD ROM drive you have, because every CD ROM on your system would have it's own settings. Anyway, here is the registry Key:
HKEY_LOCAL_MACHINE\Enum\SCSI
You would have to Enumerate all subkeys, which are the available CD Roms.
So, here is the example. Here on my PC I have 2 CD ROMs. 1 regular IDE and 1 SCSI CD-R. So for my IDE CD ROM it would be:
HKEY_LOCAL_MACHINE\Enum\SCSI\ATAPI___CD-ROM_DRIVE-24X2\MF&CHILD0001&PCI&VEN_8086&DEV_7111&SUBSYS_00000000&REV_01&BUS_00&DEV_07&FUNC_0110
Under this key there is a Value called: AutoInsertNotification which has the setting 1 (means that it's enabled, 0 - otherwise).
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
It is possible !
In fact, you just need to create a notification object watching your drive A:.
Search the MSDN for notification objects. You
If you are novice, you better forget it because you won't understand a word, I guess.
Regards,
Björn
-
I couldn't find it on MSDN. Could you please tell me where on MSDN it's located?
------------------
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879
AIM: RYoni69
-
1. I found the easy way to change the AutoInsert of the CDROM:
The Key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CDRom
Then Value:
Autorun
Change it to 1 if you want the AutoRun feature to be enabled, 0 - otherwise.
2. I dont think it worth trying to do it Björn's way in VB. If you would really want to check the Flopy. Create a small project which willrun on the background to see if the Floppy is in. You can use GetVolumeInformation API to do that. If floppy has no disk inserted the API will fail ( that's your result).
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Sure, I'm always thinking the hard way before thinking of an easy one...
Serge's way is much more better !
------------------
EMAIL: [email protected]
PAGE: <A HREF="http://members.xoom.com/sharetools
" TARGET=_blank>http://members.xoom.com/sharetools
</A>