home *** CD-ROM | disk | FTP | other *** search
/ ftp2.jacobs.com / 2015.02.ftp2.jacobs.com.tar / ftp2.jacobs.com / altiris.exe / DefaultsAndSwitches.cmd < prev    next >
OS/2 REXX Batch file  |  2010-09-01  |  2KB  |  59 lines

  1. @ECHO OFF
  2.     :: #- This bath file depends on the following
  3.     ::    - Variable "%TempDir% to be set
  4.     ::    - Program Timeout.exe to be available
  5.  
  6.  
  7.     :: #- Purpose:
  8.     ::    - Read in %1
  9.     ::    - Set variable %NSFQDN% (Fully Qualified Domain Name for Notification Server)
  10.     ::    - Set variable %AgentVersion% (Used to identify which version of re-install program has ran.)
  11.  
  12.     :: #- Set Default variable (Used just in case %1 is not used when called)
  13.     ::    - Change values to keep defaults the same as latest Symantec Management Agent version
  14. SET AgentVersion=6.0.2416||                :: Set Altiris agent version. Main program should use variable to update registry so Altiris knows machines has been "re-installed" by this version of script
  15.  
  16.     :: #- Set Default NS variable 
  17. SET NS=NS1||                        :: Un-rem this line if you want the agent to install to the NS named in the command.
  18. SET NSFQDN=Altiris%NS%.Jacobs.com||            :: Set default NS ... agent will get installed to this NS.
  19. SET AltirisDir=
  20.  
  21.  
  22.  
  23. :ReadSwitches
  24.    ECHO %1| FIND /I "?">NUL &&        GOTO HelpMenu
  25.    ECHO %1| FIND /I ".com">NUL &&    GOTO SetNS
  26.    ECHO %1| FIND /I "6.">NUL &&        GOTO SetAV
  27.    ECHO %1| FIND /I "7.">NUL &&        GOTO SetAV
  28.    ECHO %1| FIND /I "/ns">NUL &&    SHIFT && GOTO SetNS
  29.    ECHO %1| FIND /I "/AV">NUL &&    SHIFT && GOTO SetAV
  30.    SHIFT
  31.    IF "%1" == "" GOTO EndReadSwitches
  32. GOTO ReadSwitches
  33.  
  34. :SetNS
  35.    ECHO %1| FIND /I ".com" >NUL &&    SET NSFQDN=%1||     GOTO HelpMenu
  36.    SHIFT
  37. GOTO ReadSwitches
  38.  
  39. :SetAV
  40.    ECHO %1| FIND /I "6." >NUL &&    SET AgentVersion=%1||     GOTO HelpMenu
  41.    ECHO %1| FIND /I "7." >NUL &&    SET AgentVersion=%1||     GOTO HelpMenu
  42.    SHIFT
  43. GOTO ReadSwitches
  44.  
  45. :HelpMenu
  46.    ECHO Re-InstallAltiris.bat Help Menu
  47.    ECHO.
  48.    ECHO /NS ^<NSFQDN^>          Specify Fully Qualified Domain Name for the Notification
  49.    ECHO                       Server. (Must end with .com)
  50.    ECHO /AV ^<Agentversion^>    Enter Altiris agent version. Number is used to identify 
  51.    ECHO                       which version of re-install program ran. 
  52.    ECHO                       (Must begin with 7.)
  53.    ECHO.
  54.    ECHO Example^: CALL Re-InstallAltiris.bat /NS EndPointNS15.jacobs.com /AV 7.0.7436
  55.    ECHO           CALL Re-InstallAltiris.bat EndpointNS15.jacobs.com 7.0.7436
  56.    "%TempDir%\TIMEOUT.exe" 30
  57.  
  58. :Endloop
  59. GOTO :EOF||                            :: Exit batch file and make sure it only runs once.