Announcement

Collapse
No announcement yet.

Software installation batch script help please

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Software installation batch script help please

    Hi, I am trying to write a batch script using choice, set and if commands. Asks you which software you want to install, if yes is selected it sets it to true and if not it moves onto the next question. At the end all the options set as true will be installed. The choice parts work but the :INSTALL section doesn't - I've pasted the script below, can someone look and correct my mistakes:

    Code:
    @Echo off
    choice /C:YN Install Adobe
    
    IF ERRORLEVEL == 2 goto IVIEW
    IF ERRORLEVEL == 1 SET ADOBEINST=TRUE
    
    :IVIEW
    choice /C:YN Install iView
    
    IF ERRORLEVEL == 2 goto FIREFOX
    IF ERRORLEVEL == 1 SET IVIEWINST=TRUE
    
    :FIREFOX
    choice /c:YN Install Firefox
    
    IF ERRORLEVEL == 2 goto INSTALL
    IF ERRORLEVEL == 1 SET FIREFOXINST=TRUE
    
    :INSTALL
    IF ADOBEINST==TRUE CALL adobe.bat
    IF IVIEWINST==TRUE CALL iview.bat
    IF FIREFOXINST==TRUE CALL firefox.bat
    
    :END
    echo Done

  • #2
    Re: Software installation batch script help please

    What is happening when the software tried to install?
    Does this work if you run the batch file seperately?
    Do users have rights to install the software?

    A bit more information is required I think.

    Thanks

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Re: Software installation batch script help please

      See the part about "Substituting environment variable values" in this article;
      http://www.microsoft.com/resources/d....mspx?mfr=true

      And there might be even an other problem too,
      wouldn't it be better to add the full path to the *bat files that are called in the batch?

      \Rems

      This posting is provided "AS IS" with no warranties, and confers no rights.

      __________________

      ** Remember to give credit where credit's due **
      and leave Reputation Points for meaningful posts

      Comment

      Working...
      X