Click to See Complete Forum and Search --> : Make a disk start itself PLEASE READ!!
JohnDoe13579
Nov 13th, 1999, 03:22 AM
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!!!!
rino_2
Nov 13th, 1999, 03:56 AM
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.
Compwiz
Nov 13th, 1999, 05:08 AM
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
tyoung@stny.rr.com
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer
Serge
Nov 13th, 1999, 07:49 AM
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
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
Compwiz
Nov 13th, 1999, 08:41 AM
Also for a cd-rom you can make the cd have and icon by placing ICON=icon.ico in autorun.inf
Clunietp
Nov 13th, 1999, 10:48 PM
You would also have to make sure the target machine has autorun enabled .... I don't know which reg key though...
Tom
Serge
Nov 14th, 1999, 12:10 AM
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
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
Björn
Nov 14th, 1999, 07:32 PM
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
Yonatan
Nov 14th, 1999, 08:05 PM
I couldn't find it on MSDN. Could you please tell me where on MSDN it's located?
------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)
AIM: RYoni69
Serge
Nov 14th, 1999, 08:58 PM
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
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
Björn
Nov 18th, 1999, 12:02 AM
Sure, I'm always thinking the hard way before thinking of an easy one...
Serge's way is much more better !
------------------
EMAIL: shareware@lycosmail.com
PAGE: <A HREF="http://members.xoom.com/sharetools
" TARGET=_blank>http://members.xoom.com/sharetools
</A>
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.