Announcement

Collapse
No announcement yet.

SHELL & EXECUTE PARAMETERS

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

  • SHELL & EXECUTE PARAMETERS

    Trying to execute:

    DELTREE C:\FRED\*.* /Y
    C:\FRED has some sub-directories under it.

    So put:
    C:\WINDOWS\COMMAND\DELTREE.EXE in TARGET
    C:\FRED\*.* /Y in COMMAND LINE ARGUMENTS
    C:\ in WORKING DIRECTORY

    Tick WAIT FOR PROGRAM TO FINISH and NORMAL screen. Also set to execute BEFORE INSTALLING.

    When SETUP reaches this point, the Windows DOS window asks me to confirm the deletion for each of the sub-directories below C:\FRED and then I have to manually close the DOS window to allow SETUP to continue.

    If C:\FRED has no sub-directories then SETUP runs through normally.

    As expected, if I type the whole command manually in Windows it works OK.

    Any ideas of where I am going wrong with entering the arguments?

    TIA

    John

    LATER::: Wonder if complete line of arguments should be in quotes as there is a space between them. Manual says this required for long file names which I understand but not for parameters as Windows should sort this out.

    So off to try now. If no further news assume it worked.

    [This message has been edited by JXBURNS (edited 05-03-2001).]

    NO, that did not work. System flashed up the DOS window but did not actually do anything.

    Anyone else know how I can get DELTREE to work properly as SF does not know how to delete all sub-folders. TIA John

    [This message has been edited by JXBURNS (edited 05-04-2001).]

  • #2
    Re: SHELL & EXECUTE PARAMETERS

    Hi,
    You should only use quotes around a specific argument in a Command Line Argument if it might contain a space. I.E. if the path was C:\Program Files\My Program\ you would have to use: "C:\Program Files\My Program\"

    Now with regards to your EXECUTE COMMAND you should actually have the /Y before the path. So set you arguments to be this: "/Y C:\FRED\*.*" and everything should work properly.
    Also note, that instead of having: "C:\Windows\Command\DELTREE.EXE” as your target try using simply: "DELTREE".

    Command: Execute Program
    Target: DELTREE
    Command line arguments: /Y C:\FRED\*.*
    Working directory: C:\
    Mode: Normal
    Wait for program to end...: Checked

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: SHELL & EXECUTE PARAMETERS

      You know, if only the woods would clear so I can see the trees. I have scratched my head and kept looking at the syntax of DELTREE and I just never saw the /Y as being in front of the path! I think I was probably reminiscing about the good old days of DOS (and CP/M) and particularly about Novell DOS which worked differently (and correctly). Or perhaps the days of piping information into the command...

      Thanks very much for responding and more importantly putting me straight. Now hopefully the embarrasment will go away quickly in order to correct the build.

      FYI I originally had just DELTREE without it's path and because it did not work then I added the path..


      Rgds

      John

      Comment


      • #4
        Re: SHELL & EXECUTE PARAMETERS

        Mark,

        Your suggestion re /Y before path of course worked.

        However what I have found is if there are directories to delete, whilst it deletes, it does not close the DOS window despite the "Wait for program to finish" being ticked or not. I have to manually close the window for the setup to continue.

        For directories where nothing to delete, the DOS window flashes on the screen and disappears.

        I am not sure that SUF can simulate the PIF "Close on Exit" type of option??

        TIA

        John

        Comment


        • #5
          Re: SHELL & EXECUTE PARAMETERS

          Hi,
          I believe that whether or not the DOS window closes after a command has finished, is a property of the COMMAND PROMPT window in Windows.
          If I have my window set to "Close on Exit" then the DOS window will close automatically. If I take this setting off then it will not close automatically.
          Sorry but there is no way, that I know of, to automatically close a DOS window using Setup Factory 5.0.

          mark.
          MSI Factory The Next Generation Intelligent Setup Builder

          Comment


          • #6
            Re: SHELL & EXECUTE PARAMETERS

            Thanks Mark, As I thought. The only way I know would be to create a PIF file first in the \WINDOWS\COMMAND directory with "Close on exit" set and then execute the PIF file rather than the command itself..

            Do you know in which order the EXECUTE and FILE OPERATIONS work i.e. does EXECUTE run before the FILE OPERATIONS (I assume so as the tabs are in that order)??

            If the other way around I could get one setup to copy a PIF file into \WINDOWS\COMMAND. If as per the tab order, the alterative, now the latest version of SUF has the /W option, is to create another setup to create that PIF file and then run the second setup against the PIF file. Guess that would work...


            John

            Comment


            • #7
              Re: SHELL & EXECUTE PARAMETERS

              I have not used setup factory, but as far as batch files go, If you create a batch file to do the same, and in this batchfile on last line, use restart.com (which is available in the EBD.CAB file under c:\windows\command\ebd, restart will automatically close the dos windows for you. It then seems instead of having setupfactory do a deltree, have it run the batch file doing the same thing, then once the window closes (based on the restart.com), the installation will continue. Like i said, I have not used this program, but on all the cd's which i produce, this is how i do it, using other programs which i will not mention here

              ie. batch file
              @echo off
              C:\windows\command\deltree c:\fred /y
              C:\windows\command\ebd\restart.com

              Not sure of proper syntax for deltree. You also need to have the setupfactory copy restart.com to the users computer or use this:

              @echo off
              "C:\windows\command\extract c:\windows\command\ebd\ebd.cab restart.com c:\windows\command\"
              C:\windows\command\deltree c:\fred /y
              C:\windows\command\restart.com

              (the second line is very long, and you would type without the quotes)

              Comment

              Working...
              X