Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. batch file for setting env variables

batch file for setting env variables

Scheduled Pinned Locked Moved C / C++ / MFC
c++toolsquestionworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Oliver
    wrote on last edited by
    #1

    Hello, I'm working at a machine where where the VC++ batch file for setting the PATH environment variables isn't available and I don't have access to the CD today. Can anybody remind me exactly what variables are set? Cheers, John p.s. or even just paste the script would be brilliant!

    D 1 Reply Last reply
    0
    • J John Oliver

      Hello, I'm working at a machine where where the VC++ batch file for setting the PATH environment variables isn't available and I don't have access to the CD today. Can anybody remind me exactly what variables are set? Cheers, John p.s. or even just paste the script would be brilliant!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      The file vcvars32.bat, located in the C:\Program Files\Microsoft Visual Studio\VC98\Bin folder, looks like:

      @echo off
      rem
      rem Root of Visual Developer Studio Common files.
      set VSCommonDir=C:\Program Files\MICROS~3\Common

      rem
      rem Root of Visual Developer Studio installed files.
      rem
      set MSDevDir=C:\Program Files\MICROS~3\Common\msdev98

      rem
      rem Root of Visual C++ installed files.
      rem
      set MSVCDir=C:\Program Files\MICROS~3\VC98

      rem
      rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path.
      rem
      set VcOsDir=WIN95
      if "%OS%" == "Windows_NT" set VcOsDir=WINNT

      rem
      echo Setting environment for using Microsoft Visual C++ tools.
      rem

      if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%
      if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"
      set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
      set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

      set VcOsDir=
      set VSCommonDir=


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      J 1 Reply Last reply
      0
      • D David Crow

        The file vcvars32.bat, located in the C:\Program Files\Microsoft Visual Studio\VC98\Bin folder, looks like:

        @echo off
        rem
        rem Root of Visual Developer Studio Common files.
        set VSCommonDir=C:\Program Files\MICROS~3\Common

        rem
        rem Root of Visual Developer Studio installed files.
        rem
        set MSDevDir=C:\Program Files\MICROS~3\Common\msdev98

        rem
        rem Root of Visual C++ installed files.
        rem
        set MSVCDir=C:\Program Files\MICROS~3\VC98

        rem
        rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path.
        rem
        set VcOsDir=WIN95
        if "%OS%" == "Windows_NT" set VcOsDir=WINNT

        rem
        echo Setting environment for using Microsoft Visual C++ tools.
        rem

        if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%
        if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"
        set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
        set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

        set VcOsDir=
        set VSCommonDir=


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        J Offline
        J Offline
        John Oliver
        wrote on last edited by
        #3

        Thanks very much David, John

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups