now to set global path variable with batch?

This is a discussion on now to set global path variable with batch? within the Windows Programming forums, part of the Platform Specific Boards category; add-to-path.bat (starting as admin on windows xp) Code: echo old path: echo %path% path = %path%;c:\teee echo new path: echo ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    88

    now to set global path variable with batch?

    add-to-path.bat (starting as admin on windows xp)
    Code:
    echo old path:
    echo %path%
    
    path = %path%;c:\teee
    
    echo new path:
    echo %path%
    
    pause
    It`s working...

    But if I start a new cmd windows and echo %path% then it`s still the old content of path.

    The build-in graphical gui of xp is very ugly and uncomfortable to reach. I prefer to make changes with text commands in batch files.

    Can you tell me how to set them in a way them will be stored? (at least as long before I restart...)

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,649
    You can use setx.exe in a batch file to do what you want.
    http://www.microsoft.com/Downloads/d...displaylang=en

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Regarding global variable.
    By sunny_master_07 in forum C++ Programming
    Replies: 1
    Last Post: 07-29-2008, 06:38 AM
  2. global and static variable in a class delivered in a DLL
    By George2 in forum C++ Programming
    Replies: 16
    Last Post: 04-13-2008, 08:19 AM
  3. controlling modifying global variable
    By sunny_master_07 in forum C Programming
    Replies: 9
    Last Post: 04-11-2008, 04:30 AM
  4. Class member using a global variable, causing problems.
    By RealityFusion in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 11:27 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 05:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21