2 Replies Latest reply on Mar 20, 2014 7:46 AM by diegobem

    How to call Windows environment variable in VBScript Agent installation

    diegobem

      Hello friends,

       

      I found this script to install mcafee agent

       

       

      https://community.mcafee.com/message/50357#50357

       

       

      But i need to call a System environment variable of name SRV on install path where is the framepkg.exe to install the agent because this variable contains the name of the nearest server for exemple: SRV = BRSPSVR98766, so we have no problems with network overhead.

       

       

      REQUIRED_AGENT_VERSION="4.5.0.1270"

      REQUIRED_SERVER_IP="10.0.2.9:10001,213.207.93.159:10001"

      INSTALL_PATH = Chr(34) & "\\kuiken\netlogon\mcafee\framepkg.exe" & Chr(34)

      STR_PARAMETERS = " /FORCEINSTALL /INSTALL=AGENT /INSTDIR=" & Chr(34) & "%PROGRAMFILES%\McAfee\Common Framework\" & Chr(34) & " /SILENT"

      FULL_INSTALL_PATH = (INSTALL_PATH & STR_PARAMETERS)

       

       

      I need the script search the local server defined on windows variable "SRV" to install  framepkg.exe.exe

       

       

      I need call a windows variable SRV together  FULL_INSTALL_PATH = (INSTALL_PATH & STR_PARAMETERS) something like that:

       

      INSTALL_PATH = Chr(34) & "\mcafee\framepkg.exe" & Chr(34)

      ENV_PATH = SRV ( Here call the windows System Enviroment ) ******

      STR_PARAMETERS = " /FORCEINSTALL /INSTALL=AGENT /INSTDIR=" & Chr(34) & "%PROGRAMFILES%\McAfee\Common Framework\" & Chr(34) & " /SILENT"

      FULL_INSTALL_PATH = (ENV_PATH & INSTALL_PATH & STR_PARAMETERS)

       

      SRV enviroment is pre-defined on every windows 7,xp client by image.

       

      Anyone can help me?

       

      Thanks so much

       

      Message was edited by: diegobem on 3/19/14 1:41:45 PM CDT

       

      Message was edited by: diegobem on 3/19/14 1:42:25 PM CDT