Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: install multiple application using batch file  (Read 33355 times)

0 Members and 1 Guest are viewing this topic.

ethan8998

    Topic Starter


    Greenhorn

    install multiple application using batch file
    « on: March 11, 2010, 10:16:45 AM »
    Hi friends I want to make a CD which installs 5-6 programs such as adobe reader, ms office etc. automatically using batch file. pls help me

    Treval



      Hopeful

      Thanked: 14
      Re: install multiple application using batch file
      « Reply #1 on: March 12, 2010, 01:48:06 AM »
      I've found  a couple of things that could be interesting:

      1) Using msiexec with commandline switches

      2)
      Quote
      it is not so easy, because most of software installers has no command line support for batch mode installations

      3) (for the programmers out here who can help the OP by reading this):

      Quote
      You could package the applications you want to install into the projects resource file, then at run time unpack them into a temporary location and execute them. Depending on what it is you packing\unpacking you may be able to use the /S or /Silent parameters. If not, why not have a go at doing what the install program does manually. It should all be possible..

      Heres an example

      http://download.microsoft.com/download/vb60ent/samp10/1/win98/en-us/resfile.exe

      SUMMARY
      RESFILE.EXE is a sample project that shows how to store any file type in a resource file and retrieve the file for use at run-time.

      http://support.microsoft.com/kb/194409

      4) Less interesting, an application that does it for you: AllMyApps

      5) (Also for the programmers out there to help the OP) A guy who wrote such a script, but his full source is not available:

      Quote
      I wrote a script to install multiple applications but would like them to wait until the previous install is complete.  I know I can use the WSCript.Sleep command but I believe I can only vary that command on a time limit.  I need something that acts like...install application 'a'; install application 'b' once installation for application 'a' is complete; install application 'c' once installation for application 'b' is complete.
       
      This is a small piece from my script:
       
            objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\Illustrator\Illustrator.vbs"
            objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\InDesign\InDesignCS2.vbs"
            objShell.Run "\\sdc-ris\MSI_Package\gpo\Application_GPO\Quark\Quark6.vbs"

      ---------

       Taken from the WSH documents

      Run Method
      bWaitOnReturn
      Optional. Boolean value indicating whether the script should wait for the program to finish executing before continuing to the next statement in your script. If set to true, script execution halts until the program finishes, and Run returns any error code returned by the program. If set to false (the default), the Run method returns immediately after starting the program, automatically returning 0 (not to be interpreted as an error code).

      6) "Linking Multple MSI files through VB script"

      Solution 1
      Quote
      Accepted Solution (works):
      Code: [Select]
      objshell = createobject("shell.scriptingobject")

      objshell.run "c:\1.msi"
      objshell.run "c:\2.msi"

      Solution 2
      Quote
      I don't believe that ShellExecute is really going to provide the functionality that you want without some serious pain.  If you can use WSH the following code will work fine:

      Dim wsh
      Set wsh = CreateObject("WScript.Shell")
      wsh.run "msiexec /i foo.msi", ,1
      wsh.run "msiexec /i foo2.msi", ,1

      If it truly is impossible to use, another options, albeit a bit painful, would be to use the start.exe command found in NT-based OS's.  You could write a batch file which looks like this:

      start /wait msiexec /i foo.msi
      start /wait msiexec /i foo2.msi

      Not sophisticated, but functional.

      If, by chance, you have access to modify the MSI's - you could also write custom actions to essentially "chain" the MSI's internally. 

      You could also write a wrapper MSI which would launch all of the other MSI installations with the appropriate command lines.  This, again, is a bit unconventional and quite messy.  Wise for Windows Installer would make this task fairly easy, though.

      Treval
      « Last Edit: March 12, 2010, 02:00:06 AM by Treval »

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: install multiple application using batch file
      « Reply #2 on: March 12, 2010, 08:22:16 AM »
      Program I use to make installers for my stuff:

      http://www.advancedinstaller.com/download.html

      Now, that being said- the main reason I didn't respond earlier was because

      A:) the CD is obviously meant for distribution
      and
      B:) you are including copyright software on it.
      I was trying to dereference Null Pointers before it was cool.

      Treval



        Hopeful

        Thanked: 14
        Re: install multiple application using batch file
        « Reply #3 on: March 12, 2010, 09:01:28 AM »
        Lmao actually I also found that advancedinstaller but I thought hey, since he's asking a batch file maybe we should just give it to him that way instead of a third party app.. =O

        ethan8998

          Topic Starter


          Greenhorn

          Re: install multiple application using batch file
          « Reply #4 on: June 10, 2010, 12:56:51 PM »
          Thanks for giving lot of information...

          ethan8998

            Topic Starter


            Greenhorn

            Re: install multiple application using batch file
            « Reply #5 on: June 10, 2010, 01:03:23 PM »
            Thanks for giving lot of information...

            glaba



              Rookie

              • Experience: Experienced
              • OS: Windows 7
              Re: install multiple application using batch file
              « Reply #6 on: June 12, 2010, 05:05:20 PM »
              you could do
              Code: [Select]
              start adobeinstaller.exe
              start etc.exe
              ...