zoukankan      html  css  js  c++  java
  • Windows平台上的环境变量

    Windows XP中比较常见的预定义环境变量

    ===========================

    Variable

    Typical value (May vary, depending on system)

    %ALLUSERSPROFILE%

    C:\Documents and Settings\All Users

    %APPDATA%

    C:\Documents and Settings\{username}\Application Data

    %COMPUTERNAME%

    {computername}

    %COMSPEC%

    C:\Windows\System32\cmd.exe

    %HOMEDRIVE%

    C:

    %HOMEPATH%

    \Documents and Settings\{username}

    %PATH%

    C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem

    %PATHEXT%

    .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH

    %PROGRAMFILES%

    Directory containing program files, usually C:\Program Files

    %PROMPT%

    Code for current command prompt format. Code is usually $P$G

    %SYSTEMDRIVE%

    The drive containing the Windows XP root directory, usually C:

    %SYSTEMROOT%

    The Windows XP root directory, usually C:\Windows

    %TEMP% and %TMP%

    C:\DOCUME~1\{username}\LOCALS~1\Temp

    %USERNAME%

    {username}

    %USERPROFILE%

    C:\Documents and Settings\{username}

    %WINDIR%

    C:\Windows

    一些动态的环境变量

    ===========================

    Variable

    Value

    %DATE%

    Current date in the format determined by the Date command

    %TIME%

    Current time in the format determined by the Time command

    %CD%

    Current directory with its full path

    %ERRORLEVEL%

    Number defining exit status of a previous command or program

    %RANDOM%

    Random number between 0 and 32767

    Windows Vista/ 7 中常见的预定义环境变量

    ============================

    Variable

    Typical value (May vary, depending on system)

    %ALLUSERSPROFILE%

    C:\ProgramData

    %APPDATA%

    C:\Users\(username}\AppData\Roaming

    %CommonProgramFiles%

    C:\Program Files\Common Files

    %COMPUTERNAME%

    {computername}

    %COMSPEC%

    C:\Windows\System32\cmd.exe

    %HOMEDRIVE%

    C:

    %HOMEPATH%

    \Users\{username}

    %LOCALAPPDATA%

    C:\Users\{username}\AppData\Local

    %PATH%

    Varies. Includes C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem

    %PATHEXT%

    .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC

    %ProgramData%

    C:\ProgramData

    %PROGRAMFILES%

    Directory containing program files, usually C:\Program Files

    %ProgramFiles(x86)%

    In 64-bit systems, directory containing 32-bit programs. Usually C:\Program Files (x86)

    %PROMPT%

    Code for current command prompt format. Code is usually $P$G

    %Public%

    C:\Users\Public

    %SYSTEMDRIVE%

    The drive containing the Windows XP root directory, usually C:

    %SYSTEMROOT%

    The Windows XP root directory, usually C:\Windows

    %TEMP% and %TMP%

    C:\Users\{Username}\AppData\Local\Temp

    %USERNAME%

    {username}

    %USERPROFILE%

    C:\Users\{username}

    %WINDIR%

    C:\Windows

    资料来源:

    Environment Variables in Windows XP

    http://vlaurie.com/computers2/Articles/environment.htm

    Environment Variables in Windows Vista and Windows 7

    http://vlaurie.com/computers2/Articles/environment-variables-windows-vista-7.htm

  • 相关阅读:
    168. Excel Sheet Column Title
    171. Excel Sheet Column Number
    264. Ugly Number II java solutions
    152. Maximum Product Subarray java solutions
    309. Best Time to Buy and Sell Stock with Cooldown java solutions
    120. Triangle java solutions
    300. Longest Increasing Subsequence java solutions
    63. Unique Paths II java solutions
    221. Maximal Square java solutions
    279. Perfect Squares java solutions
  • 原文地址:https://www.cnblogs.com/awpatp/p/1682662.html
Copyright © 2011-2022 走看看