Announcement

Collapse
No announcement yet.

Prevent Autoplay from loading more than once?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prevent Autoplay from loading more than once?

    Hi

    here is the situation:
    Autoplay starts, the user clicks the button to execute a program, autoplay wait for the user to return(to quit the program). Everything works fine.
    But if the user decides to stay for a long time in the program the CD drive spins down, and some time later spin up again.

    Now comes the ugly part. Autoplay reloads every time the CD drive spins up again. I have tried to set /read a variable (private and regesistry) but I can only catch every second start of Autoplay.

    Is there a trick to prevent this behaviour?

    Thanks

    Patrick

  • #2
    Re: Prevent Autoplay from loading more than once?

    Hi,
    What I would do is something like this:
    1) Project Startup Event -> Check for this existence of a certain registry key. Default the variable (%RegVar%) to FALSE.
    2) Project Startup Event -> Close/Exit action Boolean condition: %RegVar% <> FALSE. Basically close the menu if the registry key exists/
    3) Right before your execute your program write the key to the registry, the one you looked for above.
    4) Project Shutdown Event -> Remove the registry key that you created.
    This is very general but these are the basic steps that I would use.

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Prevent Autoplay from loading more than once?

      Mark,

      This is a good solution, however, what if someone doesn't actually shut down the menu. For instance if they shut down their computer w/out actually closing Autoplay. Or they experience a system lockup which certainly happens in the Windows environment. Then the menu would never run again, unless they manually went into the registry. Which of course they don't know to even do that.

      Comment


      • #4
        Re: Prevent Autoplay from loading more than once?

        Hi,
        Yes that is a problem with that method, although most of the time this will never occur. You might include a README.TXT file that explains how to delete the registry key if the menu does not open, or maybe create a second AutoPlay menu that the user can run, which will simply delete the registry key and then quit. Then you would simply tell the user to run the second executable if the main menu does not run.

        mark.
        MSI Factory The Next Generation Intelligent Setup Builder

        Comment


        • #5
          Re: Prevent Autoplay from loading more than once?

          Hi

          Thanks for the tips.

          If have use an alternate registry entry as mentioned by Mark.
          In order not to lock out the user, I have used a registry entry with the current date. This way the user does not have to edit the registry itself. Rather he has to wait a day (or change the date of the system).

          Patrick

          Comment

          Working...
          X