5 Replies Latest reply on Nov 1, 2006 10:51 AM by StickyWidget

    Loading IE From an Exe

    StickyWidget
      We are deploying a CD with several HTML files that require IE to load correctly. We've coded a Flash application to be autorun from the CD, however we have only been able to use the default browser to load our HTML files, and there is no telling what everyones default browser is nowadays. Is there any way in Flash to simply specify the application we want to load, or to launch it ourselves using command line? It would be simple to do it command line style, I just don't know of any API call I could make to do that, and it would likely violate some security feature.
        • 1. Re: Loading IE From an Exe
          Level 7
          We wouldn't worry about this too much. Just launch their default browser
          using getURL.

          Otherwise trying to locate IE on different machines, different paths with
          different OS it will be a nightmare to code.

          Regards
          FlashJester Support Team
          e. - support@flashjester.com
          w. - http://www.flashjester.com

          There is a very fine line between "hobby" and
          "mental illness."


          • 2. Re: Loading IE From an Exe
            StickyWidget Level 1
            Normally, I would agree and simply take this approach. However, these html files quite literally require IE to function, as they utilize the local file system for storage. Having a user open it up direct from a menu, and have it load into firefox or opera with simply a message to have them load it in IE is unacceptable.

            Currently it is using the "GetUrl(...)" method to open. Is there any way to use the FSCommand().exec(..) to do what I want? I've noticed if I use the command line in windows to type "explorer D:\start.htm" it will open correctly in Internet Explorer, and not in Firefox.
            • 3. Re: Loading IE From an Exe
              TimSymons Level 1
              You can try to use the FSCOMMAND("exec", parameters) on a BAT file. Place your BAT file in a folder named "fscommand" and place this folder in the same location as your EXE file.

              If you can't get it to launch the BAT file then you will have to use a program like FlashJester or Studio SWF by Northcode.

              Tim
              • 4. Re: Loading IE From an Exe
                TimSymons Level 1
                The BAT file will work (at least it just did on my system).

                BAT file named "test.bat" contained the following code:
                explorer C:\start.htm

                In Flash, I place the following AS in a frame:

                me.onRelease = function():Void {
                fscommand("exec", "test.bat");
                };

                I published the EXE and when I clicked on the "me" button, IE launched and loaded start.htm.

                Couple of things to note.

                1) This will not function in test mode within Flash. You have to make it into an EXE to test it.
                2) You cannot pass any parameters to the BAT file. It must already contain everything you need or want to launch.


                Good luck with your program.

                Tim
                • 5. Re: Loading IE From an Exe
                  StickyWidget Level 1
                  Fantastic! I think this will be a good solution for what I'd like to do. Thanks Tim!

                  If anyone else happens to use this information as well, the BAT file will have to be constructed to use a relative path to the "start.htm". You never know what a user has their drive mapped to...

                  Mike