Results 1 to 11 of 11

Thread: Make a disk start itself PLEASE READ!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Posts
    24

    Post

    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!!!!

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    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.


  3. #3
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    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

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  5. #5
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Also for a cd-rom you can make the cd have and icon by placing ICON=icon.ico in autorun.inf

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    You would also have to make sure the target machine has autorun enabled .... I don't know which reg key though...

    Tom

  7. #7
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  8. #8

    Post

    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

  9. #9
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    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
    AIM: RYoni69

  10. #10
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  11. #11

    Post

    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>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width