2011/10/16

Windows 7, XP Set 環境變數路徑差異

Windows 7 和 Windows XP 預設的環境變數有變動,
理論上 Win7 將 XP 原本的路徑簡化,並少了空格,
在寫批次檔時比較不會因為少了引號而造成執行錯誤,
變得比較好記吧?!
不過在 Win7 還是保留許多 XP 原有的路徑,
但變成帶鎖的圖示,一般是無法存取的但也不需要。

%systemdrive%
07: 為安裝系統時選擇的磁碟機代號
XP: 為安裝系統時選擇的磁碟機代號

%userprofile%
07: %systemdrive%\Users\Name
XP: %systemdrive%\Documents and Settings\Name

我的文件
07: %userprofile%\Documents
XP: %userprofile%\My Documents

%appdata%
07: %userprofile%\AppData\Roaming
XP: %userprofile%\Application Data

%temp%
07: %userprofile%\AppData\Local\Temp
XP: %userprofile%\Local Settings\Temp

傳送到
07: %appdata%\Microsoft\Windows\SendTo (%userprofile%\AppData\Roaming\Microsoft\Windows\SendTo)
XP: %userprofile%\SendTo

Default User AppData
07: %systemdrive%\Users\Default\AppData\Roaming
XP: %systemdrive%\Documents and Settings\Default User\Application Data

%allusersprofile%
07: %systemdrive%\ProgramData = %systemdrive%\Users\All Users = %programdata%
XP: %systemdrive%\Documents and Settings\All Users

使用者 程式集
07: %appdata%\Microsoft\Windows\Start Menu\Programs (%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs)
XP: %userprofile%\「開始」功能表\程式集

All Users 程式集
07: %allusersprofile%\Microsoft\Windows\Start Menu\Programs = %systemdrive%\ProgramData\Microsoft\Windows\Start Menu\Programs
XP: %allusersprofile%\「開始」功能表\程式集

 
Set in Windows 7:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\NameAppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=NAME-PC
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Name
LOCALAPPDATA=C:\Users\Name\AppData\Local
LOGONSERVER=\\NAME-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 16 Model 6 Stepping 3, AuthenticAMD
PROCESSOR_LEVEL=16
PROCESSOR_REVISION=0603
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Name\AppData\Local\Temp
TMP=C:\Users\Name\AppData\Local\Temp
USERDOMAIN=NAME-PC
USERNAME=Name
USERPROFILE=C:\Users\Name
windir=C:\Windows

 
Set in Windows XP:
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Name\Application Data
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=NAME-PC
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Name
LOGONSERVER=\\NAME-PC
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 16 Model 6 Stepping 3, AuthenticAMD
PROCESSOR_LEVEL=16
PROCESSOR_REVISION=0603
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\NAME\LOCALS~1\Temp
TMP=C:\DOCUME~1\NAME\LOCALS~1\Temp
USERDOMAIN=NAME-PC
USERNAME=Name
USERPROFILE=C:\Documents and Settings\Name
windir=C:\WINDOWS

沒有留言:

張貼留言