Install Flash automagicly if not detected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • alias
    Forum Member
    • Dec 2002
    • 3

    Install Flash automagicly if not detected

    Hello i am new here and i have a question about Installing the flash player when the users hit a page it will run the following code i have no problems getting the variables to detect flash version and run then install but the object is not visible right away so i have implimented a page reload command this works good also except when the page reloads it reruns the script and goes through the installation again any suggestions? here is the easy to read version and long versions of my code

    this is an on initialize event

    //check for flash and install
    IF[%Flashversion%] >=6.0.0.0]
    ELSE
    %result% = Dialog.MessageBox ["Flash not detected","some text goes here yes no blah blah

    //comment
    IF[%result% = NO]
    RETURN
    END IF

    File.Execute["%SrcDrv%\appname.exe blah blah","",Wait]

    //another comment
    Page Reload
    END IF


    ok and now the full copy and paste code

    <IR_ACTIONS_LIST>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>this will check for and install flash player from cd if neccesary</Comment>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%FlashVersion% &amp;gt;= 6.0.0.0</Condition>
    </Action>
    <Action name="ELSE">
    <Type>206</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Message Box">
    <Type>5</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DialogTitle>Flash not Detected</DialogTitle>
    <DialogMessage>It appears you do not have a new enough version of the Flash Active X control installed would you like to install flash player now? If you choose no you will not be able to view some of the content on this cd.</DialogMessage>
    <Icon>1</Icon>
    <Variable>%Result%</Variable>
    <DialogType>1</DialogType>
    <DefaultButton>0</DefaultButton>
    </Action>
    <Action name="Blank Line">
    <Type>203</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>if user said no quit doing any more</Comment>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%Result% = no</Condition>
    </Action>
    <Action name="RETURN">
    <Type>207</Type>
    <Function>1</Function>
    <DTIndentLevel>3</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Blank Line">
    <Type>203</Type>
    <Function>2</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>if user said yes install flash player</Comment>
    </Action>
    <Action name="Execute">
    <Type>8</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <FileName>%SrcDir%\Applications\Flash\Shockwave_In staller_Full.exe</FileName>
    <CommandLine/>
    <WorkingDir/>
    <RunMode>0</RunMode>
    <WaitForReturn>1</WaitForReturn>
    </Action>
    <Action name="Blank Line">
    <Type>203</Type>
    <Function>2</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>this will reload the page then exit to normal</Comment>
    </Action>
    <Action name="Reload">
    <Type>104</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    </IR_ACTIONS_LIST>


    thanks regards for any info given
  • francisq
    Forum Member
    • Nov 2002
    • 17

    #2
    Re: Install Flash automagicly if not detected

    I would guess that a Windows restart might be necessary to get the thing properly installed - suck it and see

    Comment

    • alias
      Forum Member
      • Dec 2002
      • 3

      #3
      Re: Install Flash automagicly if not detected

      it works fine if the cd is stopped and restarted with no reboot of windows the flash works fine even without restarting the cd but it still prompts the user to install even after it is installed is there maybe a registry thing to look for or what ??

      Comment

      • francisq
        Forum Member
        • Nov 2002
        • 17

        #4
        Re: Install Flash automagicly if not detected

        Probably the FlashVersion variable is initialized when autorun starts up :-((
        Why not just assume that the install went OK and use a %FlashInstallDone% variable?
        Set it to 0 On Project Init
        test it at the beginning on On Page Init and jump over the install
        set it to 1 when you return from the install wait

        Comment

        • Corey
          Indigo Rose Staff Alumni
          • Aug 2002
          • 9745

          #5
          Re: Install Flash automagicly if not detected

          Why not set a variable when you install flash, i.e. %installed% = yes then just set your page to skip the flash check process with an IF statement whenever that variable is set to "yes". That'll work...

          Corey Milner
          Creative Director, Indigo Rose Software

          Comment

          • alias
            Forum Member
            • Dec 2002
            • 3

            #6
            Re: Install Flash automagicly if not detected

            Thank you Corey the %installed% variable worked i may not have done it the right way but it worked

            i inserted the

            %installed% = yes after the install wait was completed
            then inserted an if statement to see if it = yes if = yes end if
            else goto and run my existing script

            so the new quick version looks like

            this is an on initialize event

            //check for flash and install
            IF[%installed% = yes
            ELSE

            IF[%Flashversion%] >=6.0.0.0]
            ELSE
            %result% = Dialog.MessageBox ["Flash not detected","some text goes here yes no blah blah

            //comment
            IF[%result% = NO]
            RETURN
            END IF

            File.Execute["%SrcDrv%\appname.exe blah blah","",Wait]
            %installed% = "Yes"

            //another comment
            Page Reload
            END IF
            END IF


            so thank you again very good show

            another note i just want to add i really enjoy using your software the new 4 is nice and sleek compared to 3 and the extra functionality is another great thing

            Comment

            • Corey
              Indigo Rose Staff Alumni
              • Aug 2002
              • 9745

              #7
              Re: Install Flash automagicly if not detected

              Cool, thanks for the comments...

              Corey Milner
              Creative Director, Indigo Rose Software

              Comment

              • crvideo
                Forum Member
                • Jan 2003
                • 1

                #8
                Re: Install Flash automagicly if not detected

                this is all really good information... I'm just not sure about EXACTLY how to implement this... can you provide a semi step-by-step how to?

                just to clarify so we're on the same page... i'm trying to set it up so that autoplay will install my file "InstallAXFlash.exe" automatically, and transparent to the user when the cd starts up.

                thanks

                Comment

                • Corey
                  Indigo Rose Staff Alumni
                  • Aug 2002
                  • 9745

                  #9
                  Re: Install Flash automagicly if not detected

                  You lost me, please explain what you are asking for, thanks.

                  Corey Milner
                  Creative Director, Indigo Rose Software

                  Comment

                  Working...
                  X