8 Replies Latest reply on Sep 13, 2006 5:17 AM by Newsgroup_User

    Installing External Applications

    andyulrika_is_back
      Hello

      I have a created a movie on CD-ROM which has a button where users can install software from the CD drive. The movie first changes the resolution to 800 x 600 then resets when exited from the program.

      There are a number of issues I'm unsure about, being a bit of a novice.

      Firstly, is it wiser to have my installation shut down when the user clicks on the button to install the additional software?
      Secondly, should I first reset the screen resolution back to the original?
      Any other issues I should know about?

      Currently, here is what I have coded to the button

      on mouseUp me
      baRunProgram( the moviePath & "XtraSoftware\program.exe", "normal", true )
      end

      Anybody do this sort of thing on a regular basis?

      Any help much appreciated.

      I'm not much of a lingo expert so please don't make too technical!!!

      Thanks

      Andy
        • 1. Re: Installing External Applications
          Level 7
          Hi Andy,

          The best way to tell if you need to change the user's resolution when
          you run the installer is to test. My guess is that switching the user's
          resolution to run the installer will look odd.

          If you don't need to quit your projector to run the installer, then you
          probably don't want to change the user's resolution.

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: Installing External Applications
            andyulrika_is_back Level 1
            Hi Rob

            Thanks for your input. I should have mentioned that the CD-ROM initially changes the resolution of the screen to 800x600 then returns the resolution after exiting the CD-ROM. This CD-ROM is for education so I wanted the students / teachers to view the screen at 800x600 - enlarged to fill the screen., so as not to lose out on the 800x600 marketplace, if you know what I mean.

            So, when it came to actually installing 3rd party software from inside the CD-ROM the user wasn't pissed at their resolution being changed to anything other than it originally was.

            What I really want to achieve is this...The user opens the CD-ROM and whatever resolution is present is changed to 800x600 while the CD-ROM is playing, then when exited reverts back to resolution. That much is working fine.

            The problem I've had in the past is getting the CD-ROM to shut down while the software is running and then open a new instance of the CD-ROM after the software has been installed. This seems to be very complicated to do and while I have Buddy API I'm pretty lost when it comes to actually writing out the code.

            regards

            Andy
            • 3. Re: Installing External Applications
              Level 7
              Hi Andy,

              You will need to set your projector to animate in background to keep it
              running while the installer runs.

              You need to test for the current version of QT. You can do that like
              this using BuddyAPI:

              -----------
              on findQTVersion minVersion
              oldDelim = the itemDelimiter
              the itemDelimiter = "."
              tempVersion = baVersion("qt3")
              qtVersion = value(tempVersion.item[1])
              the itemDelimiter = oldDelim
              if qtVersion >= minVersion then
              return false
              else
              return true
              end if
              end

              -- gets the string value of the current version of QT
              -- turns the first item in the string into a number
              -- compares the number against the minimum version number that you need
              -- returns false if the current version is OK, true if it is not
              -----------

              and then to use this you can call the function and give it a minimum
              value to allow, something like this:

              -----------

              on needToInstall
              if (findQTVersion(7)) then
              if (the moviePath.char(the moviePath.char.count) = "\" then
              -- on Windows
              open -- "path to windows installer"
              else
              -- on Mac
              open -- "path to mac installer"
              end if
              else
              -- no need to install, move to next part of movie
              end if
              end
              ----------

              Once the installer on either platform starts up, you then use the window
              functions in buddyAPI to get a window handle. Then you can test to see
              if the installer is still running.

              On Windows, you can do something like this:

              installerList = baWindowList("","quicktime",false)

              on a Mac:

              installerList = baWindowList("","install",false)

              in either case, installerList will contain one or two numbers.

              When the installers have finished and closed, those same lists will be
              empty.

              So you can use a function that tests for baWindowList... at an interval
              in your Director movie, when the value is [], an empty list, the
              installer has finished.

              Since a user can do anything they want, rational or not, you should
              probably test value of baVersion again. If the user has opted out of the
              installer, the new version won't be installed.

              Does that help?

              --
              Rob
              _______
              Rob Dillon
              Adobe Community Expert
              http://www.ddg-designs.com
              412-243-9119

              http://www.macromedia.com/software/trial/
              • 4. Re: Installing External Applications
                Applied CD Level 1
                Hey Andy,

                We’ve written a number of projects that call 3rd party installers (Acrobat Reader being the most common, but we’ve done many others), we’ve also written a few projects that handle the complete install. Here are a few tips in no particular order:

                - Test on a variety of operating systems (including different flavors of Windows if that is your market)
                - I generally like to leave my projector running if there’s more things available for the user to do, restarting the projector after a 3rd party installer is nearly impossible unless you’ve written the installer. Testing to see if an installer is complete is much easier than trying to relaunch.
                - If you’re going to keep the projector running during the install build the project to run “windowed” not full screen … it’s very easy for click-happy users to accidentally pop an idle projector window to the front while the installer is waiting for user input behind and novices won’t always look at the task bar (windows) to see what’s happening.
                - Be wary of installers that require a machine restart. If you’ve got an installer that does this I would restore the screen resolution, then activate the installer, then quit the projector. If you leave your projector running with a modified screen resolution and the 3rd party installer executes a forced restart, when the users machine comes back it will be at your resolution, not theirs … and not everyone knows how to put it back. Be aware that the same installer may require restarts in some cases and not in others, this goes back to tip 1, test on a variety of OS’s.
                - This may sound simple, but if your projector needs to quit after the installer has been activated make sure the projector is compiled to animate in background … otherwise the projector halt may be interrupted by the active window focus change to your installer app, and your projector will then be left paused but open in the background.

                PS .. I see Rob has expanded his answer before I got this posted, but I’m gonna post it anyway just to provide a few more pointers.
                • 5. Re: Installing External Applications
                  andyulrika_is_back Level 1
                  Hi Rob

                  Firstly, thank you very much for your detailed and very helpful explanations. I'm going to attempt to get it all working now. Inclidentally, from the following code:

                  on findQTVersion minVersion
                  oldDelim = the itemDelimiter
                  the itemDelimiter = "."
                  tempVersion = baVersion("qt3")
                  qtVersion = value(tempVersion.item[1])
                  the itemDelimiter = oldDelim
                  if qtVersion >= minVersion then
                  return false
                  else
                  return true


                  what character is the delimiter?

                  And, from the code below:

                  if (the moviePath.char(the moviePath.char.count) = "\" then

                  I didn't understand how this worked.

                  Once again, many thanks.

                  regards

                  Andy
                  • 6. Re: Installing External Applications
                    andyulrika_is_back Level 1
                    Hello Applied CD

                    In addition to Robs suggestions this has also been very helpful. Thanks.

                    regards

                    Andy
                    • 7. Re: Installing External Applications
                      Level 7
                      The delimiter is the path separator. In windows, it is a backslash.
                      When you say a pathname, it is c:\program files\Macromedia\Director MX
                      2004\directer.exe. Each level is delimited by backslashes. In
                      Macintosh, the delimiter is a colon, so a path would look like Hard
                      Drive:Applications:Director MX2004

                      The easiest way to find out if the movie is playing on a Mac or a PC is
                      to check the delimiter (There are other ways, but this works very well.
                      If you go into a Message Window, try this:

                      put the moviePath.char(the moviePath.char.count)

                      It will tell you the delimiter for your computer. A more
                      straightforward way of saying the exact same thing is

                      put the last char of the moviePath

                      Anyway if you want to see if it is a PC, you can do this:

                      if (the moviePath.char(the moviePath.char.count) = "\" then

                      else --it is a Mac

                      end if

                      The reason is that the files will have different names on different
                      platforms. On a PC, the program to run will typically be
                      "QuicktimeInstaller.exe" and on a Mac it would be something like
                      "QuicktimeInstaller"
                      • 8. Re: Installing External Applications
                        Level 7
                        Hi Andy,

                        the itemDelimiter, or _player.itemDelimiter, is the character that is
                        used to separate items. The most common itemDelimiter is the comma. In
                        that function I needed to parse out the first number in the version that
                        was returned by the buddyAPI function baVersion. The result of that
                        function is a string, "7.2.1", for instance. To separate the 7 from the
                        rest of the string, I set the itemDelimiter to ".", a period, or decimal
                        point. Then I took the first item that was separated by the ".". Finally
                        I used the value() function to turn that "7" into the number 7 so that I
                        could compare it.

                        The default itemDelimiter character In Director is the comma, ",".

                        --
                        Rob
                        _______
                        Rob Dillon
                        Adobe Community Expert
                        http://www.ddg-designs.com
                        412-243-9119

                        http://www.macromedia.com/software/trial/