Skip to content
조회 수 11187 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Windows와 DOS 명령 프롬프트 환경 변수 리스트


변수자료값
 %ALLUSERSPROFILE%(윈도 XP) C:\Documents and Settings\All Users

(윈도 비스타) C:\ProgramData

 %APPDATA%(윈도 XP) C:\Documents and Settings\{사용자 이름}\Application Data

(윈도 비스타) C:\Users\{사용자 이름}\AppData\Roaming

 %COMPUTERNAME%{컴퓨터 이름}
 %COMSPEC%C:\Windows\System32\cmd.exe
 %HOMEDRIVE%C:
 %HOMEPATH%(윈도 XP) \Documents and Settings\{사용자 이름}

(윈도 비스타) \Users\{사용자 이름}

 %PATH%C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem
 %PATHEXT%(윈도 XP) .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF: .WSH

(윈도 비스타) .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

 %PROGRAMFILES%C:\Program Files
 %PROMPT%현재 명령 프롬프트 포맷에 대한 코드. 보통 이 코드는 $P$G로 되어 있다.
 %SYSTEMDRIVE%윈도 XP 루트 디렉터리를 포함하고 있는 드라이브. 보통 C:
 %SYSTEMROOT%윈도 디렉터리. 보통 C:\Windows로 되어 있으며, 공식적으로는 C:\WINNT이다.
 %TEMP% 및 %TMP%(윈도 XP) C:\Documents and Settings\{사용자 이름}\Local Settings\Temp

(윈도 비스타) C:\Users\{사용자 이름}\AppData\Local\Temp

 %USERNAME%{사용자 이름}
 %USERPROFILE%(윈도 NT 4, 2000) C:\windows\Profile

(윈도 XP) C:\Documents and Settings\{사용자 이름}
(윈도 비스타) C:\Users\{사용자 이름}

 %WINDIR%C:\Windows



List of Windows and DOS Command Prompt Environment Variables


Windows and DOS (Command Prompt) have several environment variables which provides a set of dynamic values that points to important system locations or settings. Environment variables provided a way for running programs and batch command script to access the true discrete values, system paths or user management settings for configuration and processing purposes, avoiding the use of hard-coded values which may fail on some systems due to great variety of system configuration.

Tip: Batch file (.bat or .cmd) also uses environment variables to store temporary values for reference later in the script, and also to communicate data and preferences to child processes.

The table lists the common built-in environment variables in Windows operating system, together with their brief explanations and default values. All environment variables is not case-sensitive.

VariableUsageWindows XPWindows Vista and Windows 7
%AllUsersProfile%Expand to full path to the All Users profile directory which contains resources such as shortcuts for Start Menu and Desktop for all users.{SystemDrive}: \ Documents and Settings \ All Users{SystemDrive}: \ ProgramData
%AppData%Contain full path to the Application Data folder of the logged-in user.{SystemDrive}: \ Documents and Settings \ {username} \ Application Data{SystemDrive}: \ Users \ {username} \ AppData \ Roaming
%CD%Display current working directory or folder.  
%ComputerName% {ComputerName}{ComputerName}
%CommonProgram Files%Point to Common Files directory.{SystemDrive}: \ Program Files \ Common Files{SystemDrive}: \ Program Files \ Common Files
%CommonProgram Files(x86)%Only available in 64-bit (x64) OS, and point to Common Files directory in 32-bit Program Files folder.{SystemDrive}: \ Program Files (x86) \ Common Files{SystemDrive}: \ Program Files (x86) \ Common Files
%ComSpec%Display full path to the command processor (Cmd.exe on Windows NT based OS and Command.exe on Windows 9x and ME).{SystemDrive}: \ Windows \ System32 \ cmd.exe{SystemDrive}: \ Windows \ System32 \ cmd.exe
%Date%Display current date in regional format.  
%ErrorLevel%Point to current error level, normally used to check error returned from previous command.  
%HomeDrive%Point to the drive for current signed on user’s home folder.{SystemDrive}: \{SystemDrive}: \
%HomePath%Point to the signed on user’s home folder.{SystemDrive}: \ Documents and Settings \ {username}{SystemDrive}: \ Users \ {username}
%LogonServer%Hold the hostname of the server that authenticated the current user’s logon credentials (name and password), normally own PC or domain controller.  
%Path%Contains a semicolon-delimited list of directories in which the command interpreter will search for executable files.{SystemDrive}: \ Windows \ system32; C: \ Windows; C: \ Windows \ System32 \ Wbem; {plus program paths}{SystemDrive}: \ Windows \ system32; C: \ Windows; C: \ Windows \ System32 \ Wbem; {plus program paths}
%PathExt%Contains a semicolor-delimited list of extensions which are defined as exectable..COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS; .WSF; .WSH.com; .exe; .bat; .cmd; .vbs; .vbe; .js; .jse; .wsf; .wsh; .msc
%ProgramFiles%Point to Program Files directory, which stores all the installed program of Windows and others.{SystemDrive}: \ Program Files{SystemDrive}: \ Program Files
%Program Files(x86)%Only available in 64-bit version, the variable force accesses to 32-bit Program Files folder bypassing Windows-on-Windows 64-bit redirection.{SystemDrive}: \ Program Files (x86){SystemDrive}: \ Program Files (x86)
%Program W6432%Only available in 64-bit version, the variable force accesses to 64-bit Program Files folder.{SystemDrive}: \ Program Files{SystemDrive}: \ Program Files
%Prompt%Display code for current command prompt format.$P$G$P$G
%Random%Return a random number between 0 and 32767.  
%SystemDrive%Point to the drive where the system folder is placed.C: ({SystemDrive} or any other drive letter)C: ({SystemDrive} or any other drive letter)
%SystemRoot%Display full path location of the system folder.{SystemDrive}: \ Windows (fomerly C: \ WINNT and C: \ WINNT35){SystemDrive}: \ Windows
%Temp% and%Tmp%Point to temporary folder.{SystemDrive}: \ Documents and Settings \ {username} \ Local Settings \ Temp{SystemDrive}: \ Users \ {username} \ AppData \ Local \ Temp
%Time%Display current time in regional format.  
%UserDomain%Hold the name of the Workgroup or Windows Domain to which the current user belongs.  
%UserName%Display currently logged on active user’s account identification name.{UserName}{UserName}
%UserProfile%Return location of the current user’s profile directory as defined in HKCU registry hive (NTUSER).{SystemDrive}: \ Documents and Settings \ {username}{SystemDrive}: \ Users \ {username}
%WinDir%Similar %SystemRoot% and point to Windows directory.{SystemDrive}: \ Windows (C: \ WINNT for previous OS and C: \ WTSRV for NT4 Terminal Server Edition){SystemDrive}: \ Windows
%Public%Display full path to Public Application Data folder. {SystemDrive}: \ Users \ Public

Windows와 DOS 명령 프롬프트 환경 변수 리스트     bullet_22_1.gif

로그인 후 댓글쓰기가 가능합니다.

?

  1. 26
    Apr 2010
    14:24

    트위터 개발하기

    Category컴퓨터잡담 Views13818
    Read More
  2. 27
    Apr 2010
    09:47

    Table_open_cache 가 늘어나지 않는 이유.

    Category컴퓨터잡담 Views15544
    Read More
  3. 27
    Apr 2010
    11:03

    Mysql 에러메시지

    Category컴퓨터잡담 Views17550
    Read More
  4. 04
    May 2010
    13:16

    [해킹차단]이런창이 뜨는 사이트들 정말 조심하길 바란다.

    Category컴퓨터잡담 Views22036
    Read More
  5. 06
    May 2010
    10:36

    시스템은 멀쩡한데 느닷없이 mysql 접속거부의 이유는 max_connect_errors과의 연관성

    Category컴퓨터잡담 Views20973
    Read More
  6. 07
    May 2010
    08:03

    배치파일 IF문

    Category컴퓨터잡담 Views11583
    Read More
  7. 11
    May 2010
    07:03

    curl대신 사용할 수 있는 소스

    Category컴퓨터잡담 Views16369
    Read More
  8. 13
    May 2010
    16:53

    엑셀 다중조건 구현하기

    Category컴퓨터잡담 Views17312
    Read More
  9. 15
    Jun 2010
    18:40

    셀에 현재 날짜와 시간 삽입

    Category컴퓨터잡담 Views10276
    Read More
  10. 18
    Jun 2010
    14:07

    Windows와 DOS 명령 프롬프트 환경 변수 리스트

    Category컴퓨터잡담 Views11187
    Read More
  11. 19
    Jun 2010
    13:01

    Windows Firewall/Internet Connection Sharing (ICS) 서비스를 시작할 수 없습니다.

    Category컴퓨터잡담 Views20959
    Read More
  12. 19
    Jun 2010
    15:08

    유동 IP시간 만료로 리부팅해야만 인터넷 사용가능한 장애원인 해결방법

    Category컴퓨터잡담 Views13774
    Read More
  13. 22
    Jun 2010
    17:27

    여러개의 엑셀파일을 하나로 합치기

    Category컴퓨터잡담 Views57413
    Read More
  14. 23
    Jun 2010
    17:24

    IE 접속제어 후킹

    Category컴퓨터잡담 Views7416
    Read More
  15. 27
    Jun 2010
    23:27

    정부의 부동산 재테크 실력은 부동산 경기침체 때 발휘한다.

    Category컴퓨터잡담 Views5708
    Read More
  16. 30
    Jun 2010
    18:05

    메모리 사용계획 어떻게 할것인가?

    Category컴퓨터잡담 Views15375
    Read More
  17. 03
    Jul 2010
    09:57

    Div 사용한 클릭시 테이블 숨기고 감추기

    Category컴퓨터잡담 Views19994
    Read More
  18. 03
    Jul 2010
    10:17

    JavaScript1.2 Event mouse css 제어

    Category컴퓨터잡담 Views7514
    Read More
  19. 03
    Jul 2010
    10:43

    마우스 오버시 DIV 레이어 감추기 / 보이기

    Category컴퓨터잡담 Views15932
    Read More
  20. 03
    Jul 2010
    15:53

    둥근 모서리 박스 자동 생성

    Category컴퓨터잡담 Views6312
    Read More
Board Pagination Prev 1 ... 4 5 6 7 8 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소