No announcement yet.

RunOnce msgbox

  • Filter
  • Time
  • Show
Clear All
new posts

  • RunOnce msgbox

    Just getting some feedback on this one for now ...

    Supposing I want a msgbox/Dialog.MessageBox to pop-up when a CD is inserted into the drive for the first time by the user, but it should only appear the first time.
    Any thoughts on how to accomplish this. Not forgetting, the user would have no ability to burn the CD in any way to delete/alter any files that prompted the msgbox to work.
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  • #2
    Re: RunOnce msgbox

    You need to write a locally persistent reference somewhere. I know there's tons of other places to write a reference to including the HD or internet, but one exotic variation is that Flash has a neat thing called "Shared Local Objects" which allow you to write "cookie" type data...

    Corey Milner
    Creative Director, Indigo Rose Software


    • #3
      Re: RunOnce msgbox

      Aside from Flash, there are two other easy ways:
      • Write a value to the Registry. My personal fave; no files to be deleted or to clutter up the user's system.
      • Create a text file somewhere on the user's hard drive, and use its existence (or contents) to determine whether it's the first time or not.
      --[[ Indigo Rose Software Developer ]]


      • #4
        Re: RunOnce msgbox

        My first thought would be to place in in their registry, but they could change computers and see it again. Can you have the CD run based on an internet connection and if the internet connection is there, look for something on your site, if this is their first time display the message, if not open the CD. If there is no internet connection then don't start the CD. will have to play with that one tomorrow if I have the time.
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine


        • #5
          Re: RunOnce msgbox

          Keeping the CD unique to a user, reguardless of the computer is alot harder. For the internet solution to work you'd need to have your site identify the CD uniquely, and not the computer (so standard online IDs (IP, MAC, etc...) wouldn't work.

          You could go the serial number route, and have that serial number (which entered by the user) identify the CD to the website, to then display the box only on first run---but that seems overly complicated. I'd just change the box to be a: "This is the first time you've run this software on this computer..." msgbox...


          • #6
            Re: RunOnce msgbox

            Actually, making a unique CD isn't a problem, since CD's are read only. At least, so long as you're doing duplication yourself with CDRs, and aren't having CDs pressed in bulk. Just put a serial number in a text file on the the text file in as an external reference (which is the only way you can read it in, in any case [img]/ubbthreads/images/icons/smile.gif[/img]) and use that serial number in your Internet database query.

            Then, just change the text file for every CD you burn.

            If you're having CDs pressed in bulk, and the only CD you can actually change is your'll need something else, like a serial number that the user has to input in order to make the CD work (doesn't have to be very long), so that all you'd have to change for each CD is a sticker on the case, or something.

            Of course, if the user doesn't have an Internet connection, you're SOL.
            --[[ Indigo Rose Software Developer ]]