Announcement

Collapse
No announcement yet.

Minimize/Restore Window

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

  • Minimize/Restore Window

    I am trying to build a menu that minimizes the CD windows when an action is executed and then restores the CD window after the action is completed.

    For example, user clicks to Open a document and the CD window minimizes. Then, user close/exits the document and the CD window restore.

    Is there a way this can be accomplished?

  • #2
    Re: Minimize/Restore Window

    Hi,
    This is only possible if you are using an EXECUTE PROGRAM action. What you would do is have three actions:
    1) WINDOW MINIMIZE
    2) EXECUTE PROGRAM, with "Wait For Return" checked. If you want to open a document you would pass the name of your document as an Argument.
    3) WINDOW RESTORE

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Minimize/Restore Window

      Okay... So I can't do what I originally wanted to do (i.e., minimize, open document, restore) because the document is not an executable file.

      But if I understand your post correctly, I can open a document (e.g., readme.txt) related to a program before executing the program. The only thing I am a little fuzzy on is the Arguments field. What exactly do I put in this field?

      File Name: %SrcDrv%\VCD\Program.exe
      Arguments: ?
      Working Dir: %SrcDrv%\VCD
      Wait for Return: check marked

      Please fill in blank(s)

      Comment


      • #4
        Re: Minimize/Restore Window

        Hi,
        In my example you would place the full path to a document in the arguments field. So that the program being executed will open it.

        Lets say you wanted to minimize your menu, open a Text Document, and then when the Text Document is closed restore the Menu. If so you could do the following:

        1) WINDOW MINIMIZE

        2) EXECUTE PROGRAM
        File Name: %WinDir%\Notepad.exe
        Arguments: %SrcDrv%\Docs\MyTxtFile.
        Working Dir:
        Wait for Return: checked

        3) WINDOW RESTORE

        What the Arguments field is doing in this case is passing the Program that is being executed the location of the file to be opened. So what will happen is the program will start with the file, passed to it in the Arguments section, loaded.

        mark.


        MSI Factory The Next Generation Intelligent Setup Builder

        Comment


        • #5
          Re: Minimize/Restore Window

          Mark:

          I followed your instructions to the letter. However, I received the below error message when attempting to open the text document:

          "Notepad

          Cannot open C:\Docs\MyTxtFile.txt.
          Make sure a disk is in the drive you specified."

          (Note: I tried it with and without the file extension)

          Is this one of those commands that do not work in preview mode or what?

          Still


          [This message has been edited by eljay (edited 04-02-2001).]

          Comment


          • #6
            Re: Minimize/Restore Window

            Hi,
            Does the file C:\Docs\MyTxtFile.txt exist on your hard drive? You need to substitute the name and path of a file that you want to open, one that exists on your hard drive, in order for this function to work.

            Basically what you put in the Argument field is what you would have as the target if you pointed an OPEN DOCUMENT action at the text file.

            mark.

            [This message has been edited by Mark (edited 04-03-2001).]
            MSI Factory The Next Generation Intelligent Setup Builder

            Comment


            • #7
              Re: Minimize/Restore Window

              Hi,
              You can actually have an EXECUTE PROGRAM command that looks like:

              EXECUTE PROGRAM
              File Name: wordpad
              Argument: "You path"
              Wait For Return: "Checked"

              You should test this on all the majors OS's (WIN 95, 98, ME, NT, 2000) but I'm pretty sure that you can just use "wordpad" to execute Wordpad on all of them. This is because Wordpad has an Entry in the "App Paths" registry key.

              Try this out; I'm almost positive that you won't have anymore problems.

              mark.
              MSI Factory The Next Generation Intelligent Setup Builder

              Comment


              • #8
                Re: Minimize/Restore Window

                No dice...

                Unfortunately, didn't work for me. WordPad opened with the following error:

                "WordPad

                C:\Virtual
                Cannot find this file.
                Please verify that the correct path and file are given."

                (Note: I tried different variations in the Arguments field, but nothing worked.)

                What next if anything?

                P.S. Mark, I really appreciate your efforts whether we figure this one out or not.

                Comment


                • #9
                  Re: Minimize/Restore Window

                  Hi,
                  O.k. put double quotes around your argument. So your argument should look like: "%SrcDrv%\MyFile.Txt"

                  The reason that you got the error was because you had a space in your Arguments, the double quotes at the front and at the end of your argument should take care of this.

                  mark.
                  MSI Factory The Next Generation Intelligent Setup Builder

                  Comment


                  • #10
                    Re: Minimize/Restore Window

                    Oh well, we tried. Nothing seems to work for me on this one. (I forgot all about the mp3 idea and just focused on the WordPad problem.)

                    Here are the results:

                    Test #1

                    1) Minimize Window

                    2) Execute Program
                    Filename: WordPad.exe (and tried WordPad only as well)
                    Arguments: "%SrcDrv%\C:\Virtual CD\Docs\MyTextFile.wri"
                    Wait for return: Checked

                    3) Restore Window

                    Test failed: Nothing happened

                    Test #2

                    1) Minimize Window

                    2) Execute Program
                    Filename: WordPad (no ext.)
                    Arguments: "C:\Virtual CD\Docs\MyTextFile.wri"
                    Wait for return: Not checked
                    3) Restore Window

                    Results: Error (same as above post) with WordPad window in background and then document opens in another (or separate) window. No menu minimize or restore function.

                    Test #3

                    1) Minimize Window

                    2) Execute Program
                    Filename: WordPad (no ext.)
                    Arguments: "C:\Virtual CD\Docs\MyTextFile.wri" (with and without quotes)
                    Wait for return: Checked
                    3) Restore Window

                    Results: Documents opens, but no minimize and restore function

                    I tried other variations that either resulted in errors or the document opening with no menu minimize and restore.

                    Mark, I am fresh out of ideas on this one.

                    Thanks for your help.

                    P.S. BTW, the minimize/restore works just fine when using Notepad along with your related instructions in the previous post. But alas, this method doesn't help me. So, I guess I'll have to stick with Open document command for each text file.




                    [This message has been edited by eljay (edited 04-03-2001).]

                    Comment


                    • #11
                      Re: Minimize/Restore Window

                      Mark, thanks for the reply.

                      Yes, the text file is on the HD in the Virtual CD folder. I changed the Arguments field to include the VCD folder (i.e. %SrcDrv%\C:\Virtual CD\MyTxtFile.txt) and it worked just fine... Thanks

                      The problem have is that all my text files are in MS WordPad (.wri) format. So, the above method will not work since the WordPad.exe may reside in a different directory path from one computer to the next.

                      For instances, my WordPad.exe is in the "C:\Program Files\Accessories directory. This obviously may or may not be the case for other users.

                      Therefore, can you think of or suggest a workaround for this problem.

                      Here's hoping,

                      eljay

                      Comment

                      Working...
                      X