Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Auto-starting a diskette

    Hi

    I've put some html files on a diskette, and want the index.html file to automatically start when someone clicks their A drive in Windows Explorer or (better) when they insert the diskette into their A drive. Is this possible?

    I tried creating an "Autorun.inf" file containing the following text:
    <hr>[Autorun]
    OPEN="index.html"<hr>
    ... but that didn't work (said "Installation failed").

    Are there other straightforward alternatives?

    Thanks
    Dale

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Auto-starting a diskette

    Unlike the Macintosh, I don't think Windows ever automatically mounted a floppy drive (except at boot time). As far as I know, this cannot be done.

  3. #3
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Auto-starting a diskette

    <P ID="edit" class=small>(Edited by bigaldoc on 24-Sep-03 05:31. )</P>Don't you think the vast majority of people have CD drives, so you'd be better off to use CD? In any case, I've never had this need, so I did a Google on "autorun floppy" and came up with lots of hits. You'll have to take an in-depth look to see if you can find something acceptable. One product I looked at is located here, but it would be hard for me to justify the PRICE!

    Edited to add: I forgot one other. I also looked at this one, from someone who claims to be a teen, with pictures and all, in Canada. But when you click on the link it downloads a Zip with only an EXE file in it and no TXT or Readme or anything. I got nervous and quit that one!

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-starting a diskette

    There are a couple of issues involved in this interesting question:

    1) Floppy disk drives cannot be made to "start on insertion". I don't believe there is any simple way of doing that. It has to do with the underlying shell programming as to how the shell is to handle the specific types of drives. In theory, you might be able to 'trick' the OS into thinking that the drive type was really a CD drive -- but I suspect that is either not possible or fraught with problems. I have never seen anyone pull it off.

    2) You can make the .html file start as one double-click on the diskette's icon -- but this takes a little bit of maneuvering. Several things need to occur:

    a) You need to instruct the shell that "Removable Drives" are allowed to use the "AutoPlay" feature.
    -- I think and I must assume this is NOT the default state from Microsoft.
    [img]/forums/images/smilies/cool.gif[/img] You need to write the Autorun.inf file in a manner so that it will run on all computers that it might encounter.
    c) You may want a method to disable the Removable Drive AutoPlay feature when you are done -- thereby returning the computer back to its original, baseline state.

    How does one do that? And can it all be done on-the-fly from the same diskette? I don't know, but it is worth a try! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    ___________________

    I am sure there are several techniques -- but I will bet that Jefferson will be most helpful if we use Visual Basic Script. First, we need to create a .vbs file that will tell the computer to AutoRun Removable Diskettes. The registry value that we need to modify is this:

    HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVe rsionPoliciesExplorer
    NoDriveTypeAutoRun=

    I believe the default setting for this should be 0x00000095 -- which instructs the shell to NOT AutoRun Drives that are Network, Removable, or Unknown. We want to remove the block on Removable Drives, so to do that we need to modify this value to be 0x00000091. (We want to subtract 4). If we convert that result to Decimal, we get 145.

    To do that in VBS, we need this:
    __________

    'declare variables
    Dim oWshShell, sValue, lData

    'create scripting object
    Set oWshShell = WScript.CreateObject("WScript.Shell")

    'define variables
    sKey = "HKCUSoftwareMicrosoftWindowsCurrentVersionPolicie sExplorerNoDriveTypeAutoRun"
    lData = "145"

    'run the command
    oWshShell.RegWrite sKey, lData, "REG_DWORD"

    'release the object
    Set oWshShell = Nothing

    _____________

    OK, so this file will succeed in allowing us to "AutoRun" Removable Drives. However, that STILL does not make the Floppy drive "run on insertion". What it does instead is allow you to make a "clickable" floppy -- one that can be double-clicked and made to run a program. (Some sites claim this only works in Win9x -- I don't know for sure...)

    Now the REALLY tough part. How do we get that file to RUN before the disk is inserted?? That might be a little challenging. You could email it to them like a virus and ask them to run this really cool file... OK, maybe not. I am going to have to think about this.
    ___________________________________

    Next, your AutoRun.inf file is not correct. The "OPEN=" line needs to point to an executable -- not just a file. You have a couple of options:

    1) Use Internet Explorer open the .html file
    2) Use the default HTML browser to open the file.

    I believe to use IE, you need to modify the line to be:

    OPEN=iexplore.exe "index.htm"

    Or to use the default browser, you can sometimes use:

    OPEN=start.exe "index.htm"

    But, apparently not all versions of Windows shipped with start.exe. I am not sure the "" are needed if there are no spaces in the title of the file -- you might want to try it both ways.

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-starting a diskette

    I found this statement that may better explain why you cannot get floppies to truly 'AutoRun':

    "Most floppy drive controllers do not notify the system when a new floppy has been inserted in the drive and so the auto in autoplay, in this case, is a bit of a false claim."

    If the floppy controller has no "Auto-Insert Notification" method, then there is no way you can get floppy to immediately AutoRun. That long report also indicates that the default NoDriveTypeAutoRun default is 95 -- so I will modify accordingly.
    _________________________

    Now, if you know that your users are ONLY going to be using WinXP, you can use "SHELLEXECUTE=" instead of "OPEN=". That will allow you to simply point to the file:

    [AutoRun]
    SHELLEXECUTE=index.html

    However, that will not work on Win9x.

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Auto-starting a diskette

    Thanks for interesting suggestions.
    <UL><LI>BigAl:

  7. #7
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-starting a diskette

    I didn't say it was easy. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> It might be easier to buy a CD-ROM player for the ones that don't have them! ;-]

Posting Permissions

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