aardio 官方社区

 找回密码
 注册会员

QQ登录

只需一步,快速开始

搜索
查看: 25897|回复: 14

XP,WIN7 系统路径、特殊路径对比、获取方法大全

  [复制链接]

27

主题

648

回帖

4138

积分

超级版主

积分
4138
发表于 2013-11-14 20:01:09 | 显示全部楼层 |阅读模式
/*
io.getSpecial() 与 fsys.getSpecial() 基本用法一样可以相互替代。
*/


import fsys;
import console;

console.log( io.getSpecial(0x5
/*_CSIDL_MYDOCUMENTS*/,"/../../" )  )
//  XP: C:\Documents and Settings  
//WIN7: C:\Users
//表示“我的文档”桌面项的虚拟文件夹。

console.log( io.getSpecial(0x2e
/*_CSIDL_COMMON_DOCUMENTS*/,"/../" )  )
//  XP: C:\Documents and Settings\All Users
//WIN7: C:\ProgramData
//包含所有用户所共用文档的文件系统目录。

console.log( io.getSpecial(0x23
/*_CSIDL_COMMON_APPDATA*/) )
//  XP: C:\Documents and Settings\All Users\Application Data
//WIN7: C:\ProgramData
//包含所有用户的应用程序数据的文件系统目录。

console.log( io.getSpecial(0x19
/*_CSIDL_COMMON_DESKTOPDIRECTORY*/) )
//  XP: C:\Documents and Settings\All Users\desktop
//WIN7: C:\Users\Public\Desktop
//包含显示在所有用户的桌面上的文件和文件夹的文件系统目录。

console.log( io.getSpecial(0x2e
/*_CSIDL_COMMON_DOCUMENTS*/) )
//  XP: C:\Documents and Settings\All Users\Documents
//WIN7: C:\Users\Public\Documents
//包含所有用户所共用文档的文件系统目录。

console.log( io.getSpecial(0x1f
/*_CSIDL_COMMON_FAVORITES*/) )
//  XP: C:\Documents and Settings\All Users\Favorites
//WIN7: C:\Users\Public\Favorites
//作为所有用户所共用收藏夹项的公共储存库的文件系统目录。

console.log( io.getSpecial(0x2d
/*_CSIDL_COMMON_TEMPLATES*/) )
//  XP: C:\Documents and Settings\All Users\Templates
//WIN7: C:\ProgramData\Microsoft\Windows\Templates
//包含可用于所有用户的模板的文件系统目录。

console.log( io.getSpecial(0x16
/*_CSIDL_COMMON_STARTMENU*/) )
//  XP: C:\Documents and Settings\All Users\「开始」菜单
//WIN7: C:\ProgramData\Microsoft\Windows\Start Menu
//包含在所有用户的“开始”菜单上出现的程序和文件夹的文件系统目录。

console.log( io.getSpecial(0x6
/*_CSIDL_FAVORITES*/) )
//  XP: C:\Documents and Settings\All Users\收藏夹
//WIN7: C:\Users\Public\Favorites
//作为用户的收藏夹项的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0x1a
/*_CSIDL_APPDATA*/) )
//  XP: C:\Documents and Settings\Default Users\Application Data
//WIN7: C:\Users\Default\AppData\Roaming
//作为应用程序特定数据的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0x21
/*_CSIDL_COOKIES*/) )
//  XP: C:\Documents and Settings\Default Users\Cookies
//WIN7: C:\Users\Default\AppData\Roaming\Microsoft\Windows\Cookies
//作为 Internet Cookie 的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0x1c
/*_CSIDL_LOCAL_APPDATA*/ ) )
//  XP: C:\Documents and Settings\Default Users\Local Settings\Application Data
//WIN7: C:\Users\Default\AppData\Local
//作为本地(非漫游)应用程序的数据储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0x5
/*_CSIDL_MYDOCUMENTS*/) )
//  XP: C:\Documents and Settings\Default Users\My Documents
//WIN7: C:\Users\Default\Documents
//表示“我的文档”桌面项的虚拟文件夹。

console.log( fsys.getSpecialDefault(0x13
/*_CSIDL_NETHOOD*/) )
//  XP: C:\Documents and Settings\Default Users\NetHood
//WIN7: C:\Users\Default\AppData\Roaming\Microsoft\Windows\Network Shortcuts
//包含可能存在于“网络邻居”虚拟文件夹中的链接对象的文件系统目录。该目录不同于 CSIDL_NETWORK,后者表示的是网络命名空间根目录。

console.log( fsys.getSpecialDefault(0x1b
/*_CSIDL_PRINTHOOD*/) )
//  XP: C:\Documents and Settings\Default Users\PrintHood
//WIN7: C:\User\Default\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
//含可能存在于“打印机”虚拟文件夹中的链接对象的文件系统目录。

console.log( fsys.getSpecialDefault(0x8
/*_CSIDL_RECENT*/) )
//  XP: C:\Documents and Settings\Default Users\Recent
//WIN7: C:\User\Default\AppData\Roaming\Microsoft\Windows\Recent
//包含指向用户最近使用文档的快捷方式的文件系统目录。

console.log( fsys.getSpecialDefault(0x9
/*_CSIDL_SENDTO*/) )
//  XP: C:\Documents and Settings\Default Users\SendTo
//WIN7: C:\User\Default\AppData\Roaming\Microsoft\Windows\SendTo
//包含“发送到”菜单项的文件系统目录。

console.log( fsys.getSpecialDefault(0xb
/*_CSIDL_STARTMENU*/) )
//  XP: C:\Documents and Settings\Default Users\Start Menu
//WIN7: C:\User\Default\AppData\Roaming\Microsoft\Windows\Start Menu
//包含“开始”菜单项的文件系统目录。

console.log( fsys.getSpecialDefault(0x15
/*_CSIDL_TEMPLATES*/) )
//  XP: C:\Documents and Settings\Default Users\Templates
//WIN7: C:\User\Default\AppData\Roaming\Microsoft\Windows\Templates
//作为文档模板的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0xd
/*_CSIDL_MYMUSIC*/) )
//  XP: C:\Documents and Settings\Default Users\My Documents\My Music
//WIN7: C:\Users\Public\Music
//作为音乐文件的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0x27
/*_CSIDL_MYPICTURES*/) )
//  XP: C:\Documents and Settings\Default Users\My Documents\My Pictures
//WIN7: C:\Users\Public\Pictures
//作为图像文件的公共储存库的文件系统目录。

console.log( fsys.getSpecialDefault(0xe
/*_CSIDL_MYVIDEO*/) )
//  XP: C:\Documents and Settings\Default Users\My Documents\My Videos
//WIN7: C:\Users\Public\Videos
//作为视频文件的公共储存库的文件系统目录。

console.log( io.getSpecial(0x28
/*_CSIDL_PROFILE*/) )
//  XP: C:\Documents and Settings\用户名
//WIN7: C:\Users\用户名
//当前登录用户目录

console.log( io.getSpecial(0x1a
/*_CSIDL_APPDATA*/) )
//  XP: C:\Documents and Settings\用户名\Application Data
//WIN7: C:\Users\用户名\AppData\Roaming
//作为应用程序特定数据的公共储存库的文件系统目录。

console.log( io.getSpecial( 0x21
/*_CSIDL_COOKIES*/) )
//  XP: C:\Documents and Settings\用户名\Cookies
//WIN7: C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Cookies
//作为 Internet Cookie 的公共储存库的文件系统目录。

console.log( io.getSpecial(0x1c
/*_CSIDL_LOCAL_APPDATA*/ ) )
//  XP: C:\Documents and Settings\用户名\Local Settings\Application Data
//WIN7: C:\Users\用户名\AppData\Local
//作为本地(非漫游)应用程序的数据储存库的文件系统目录。

console.log( io.getSpecial(0x5
/*_CSIDL_MYDOCUMENTS*/) )
//  XP: C:\Documents and Settings\用户名\My Documents
//WIN7: C:\Users\用户名\Documents
//表示“我的文档”桌面项的虚拟文件夹。

console.log( io.getSpecial(0x13
/*_CSIDL_NETHOOD*/) )
//  XP: C:\Documents and Settings\用户名\NetHood
//WIN7: C:\Users\用户名\AppData\Roaming\Microsoft\Windows\Network Shortcuts
//包含可能存在于“网络邻居”虚拟文件夹中的链接对象的文件系统目录。该目录不同于 CSIDL_NETWORK,后者表示的是网络命名空间根目录。

console.log( io.getSpecial(0x1b
/*_CSIDL_PRINTHOOD*/) )
//  XP: C:\Documents and Settings\用户名\PrintHood
//WIN7: C:\User\用户名\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
//含可能存在于“打印机”虚拟文件夹中的链接对象的文件系统目录。

console.log( io.getSpecial(0x8
/*_CSIDL_RECENT*/) )
//  XP: C:\Documents and Settings\用户名\Recent
//WIN7: C:\User\用户名\AppData\Roaming\Microsoft\Windows\Recent
//包含指向用户最近使用文档的快捷方式的文件系统目录。

console.log( io.getSpecial(0x9
/*_CSIDL_SENDTO*/) )
//  XP: C:\Documents and Settings\用户名\SendTo
//WIN7: C:\User\用户名\AppData\Roaming\Microsoft\Windows\SendTo
//包含“发送到”菜单项的文件系统目录。

console.log( io.getSpecial(0x15
/*_CSIDL_TEMPLATES*/) )
//  XP: C:\Documents and Settings\用户名\Templates
//WIN7: C:\User\用户名\AppData\Roaming\Microsoft\Windows\Templates
//作为文档模板的公共储存库的文件系统目录

console.log( io.getSpecial(0xb
/*_CSIDL_STARTMENU*/) )
//  XP: C:\Documents and Settings\用户名\「开始」菜单
//WIN7: C:\User\用户名\AppData\Roaming\Microsoft\Windows\Start Menu
//包含“开始”菜单项的文件系统目录。

console.log( io.getSpecial(0x22
/*_CSIDL_HISTORY*/) )
//  XP: C:\Documents and Settings\用户名\Local Settings\History
//WIN7: C:\Users\用户名\AppData\Local\Microsoft\Windows\History
//作为 Internet 历史记录项的公共储存库的文件系统目录

console.log( io.getSpecial(0x20
/*_CSIDL_INTERNET_CACHE*/) )
//  XP: C:\Documents and Settings\用户名\Local Settings\Temporary Internet Files
//WIN7: C:\Users\用户名\AppData\Local\Microsoft\Windows\Temporary Internet Files
//作为临时 Internet 文件的公共储存库的文件系统目录

console.pause();

评分

参与人数 3 +31 收起 理由
MMiao79 + 10 赞一个!
pw33 + 11 赞一个!
将军 + 10 很给力!

查看全部评分

27

主题

648

回帖

4138

积分

超级版主

积分
4138
 楼主| 发表于 2013-11-14 20:03:35 | 显示全部楼层
import win.ui;
/*DSG{{*/
var winform = ..win.form( text="文件路径环境变量转换工具";bottom=232;max=false;border="dialog frame";right=599 )
winform.add(
button={ bottom=174;text=
"转换环境变量";left=326;top=140;z=2;right=450;cls="button" };
static={ bottom=87;text=
"请在下面输入文件或目录路径:";left=74;top=66;z=3;transparent=1;right=343;cls="static" };
editPath={ bottom=128;right=540;left=70;multiline=1;top=96;z=1;edge=1;cls=
"edit" }
)
/*}}*/

import fsys.environment;
winform.editPath.text = fsys.getSpecial(  0x1a
/*_CSIDL_APPDATA*/ )

winform.button.oncommand =
function(id,event){
   
var path = winform.editPath.text;
   
if( string.indexOf(path,"%") ){
        winform.editPath.text = fsys.environment.expand(path);
    }
   
else {
        winform.editPath.text = fsys.environment.unExpand(path);
    }
}

winform.show();
win.loopMessage();

27

主题

648

回帖

4138

积分

超级版主

积分
4138
 楼主| 发表于 2013-12-17 18:37:48 | 显示全部楼层
_CSIDL_PROFILE---------------> C:\Documents and Settings\<user>
_CSIDL_DESKTOP---------------> C:\Documents and Settings\<user>\Desktop
_CSIDL_PROGRAMS--------------> C:\Documents and Settings\<user>\Start Menu\Programs
_CSIDL_PERSONAL--------------> C:\Documents and Settings\<user>\My Documents
_CSIDL_FAVORITES-------------> C:\Documents and Settings\<user>\Favorites
_CSIDL_STARTUP---------------> C:\Documents and Settings\<user>\Start Menu\Programs\Startup
_CSIDL_RECENT----------------> C:\Documents and Settings\<user>\Recent
_CSIDL_SENDTO----------------> C:\Documents and Settings\<user>\SendTo
_CSIDL_STARTMENU-------------> C:\Documents and Settings\<user>\Start Menu
_CSIDL_DESKTOPDIRECTORY------> C:\Documents and Settings\<user>\Desktop
_CSIDL_NETHOOD---------------> C:\Documents and Settings\<user>\NetHood
_CSIDL_TEMPLATES-------------> C:\Documents and Settings\<user>\Templates
_CSIDL_APPDATA---------------> C:\Documents and Settings\<user>\Application Data
_CSIDL_PRINTHOOD-------------> C:\Documents and Settings\<user>\PrintHood
_CSIDL_LOCALAPPDATA----------> C:\Documents and Settings\<user>\Local Settings\Application Data
_CSIDL_INTERNETCACHE---------> C:\Documents and Settings\<user>\Local Settings\Temporary Internet Files
_CSIDL_COOKIES---------------> C:\Documents and Settings\<user>\Cookies
_CSIDL_HISTORY---------------> C:\Documents and Settings\<user>\Local Settings\History
_CSIDL_MYPICTURES------------> C:\Documents and Settings\<user>\My Documents\My Pictures
_CSIDL_ADMINTOOLS------------> C:\Documents and Settings\<user>\Start Menu\Programs\Administrative Tools


_CSIDL_ALTSTARTUP------------>
_CSIDL_COMMONALTSTARTUP------>
_CSIDL_PROGRAMFILESX86------->
_CSIDL_PROGRAMFILESCOMMONX86->


_CSIDL_CONTROLS-------------->
_CSIDL_PRINTERS-------------->
_CSIDL_BITBUCKET------------->
_CSIDL_DRIVES---------------->
_CSIDL_NETWORK--------------->
_CSIDL_CONNECTIONS----------->


_CSIDL_WINDOWS---------------> C:\WINDOWS
_CSIDL_SYSTEM----------------> C:\WINDOWS\system32
_CSIDL_PROGRAMFILES----------> C:\Program Files
_CSIDL_SYSTEMX86-------------> C:\WINDOWS\system32
_CSIDL_PROGRAMFILESCOMMON----> C:\Program Files\Common Files
_CSIDL_FONTS-----------------> C:\WINDOWS\Fonts


_CSIDL_COMMONAPPDATA---------> C:\Documents and Settings\All Users\Application Data
_CSIDL_COMMONSTARTMENU-------> C:\Documents and Settings\All Users\Start Menu
_CSIDL_COMMONPROGRAMS--------> C:\Documents and Settings\All Users\Start Menu\Programs
_CSIDL_COMMONSTARTUP---------> C:\Documents and Settings\All Users\Start Menu\Programs\Startup
_CSIDL_COMMONDESKTOPDIRECTORY--C:\Documents and Settings\All Users\Desktop
_CSIDL_COMMONFAVORITES-------> C:\Documents and Settings\All Users\Favorites
_CSIDL_COMMONTEMPLATES-------> C:\Documents and Settings\All Users\Templates
_CSIDL_COMMONADMINTOOLS------> C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools
_CSIDL_COMMONDOCUMENTS------->

27

主题

648

回帖

4138

积分

超级版主

积分
4138
 楼主| 发表于 2013-12-17 18:39:32 | 显示全部楼层
_CSIDL_PROFILE---------------> C:\Users\<user>
_CSIDL_DESKTOP---------------> C:\Users\<user>\Desktop
_CSIDL_PROGRAMS--------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
_CSIDL_PERSONAL--------------> C:\Users\<user>\Documents
_CSIDL_FAVORITES-------------> C:\Users\<user>\Favorites
_CSIDL_STARTUP---------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
_CSIDL_RECENT----------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent
_CSIDL_SENDTO----------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\SendTo
_CSIDL_STARTMENU-------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu
_CSIDL_DESKTOPDIRECTORY------> C:\Users\<user>\Desktop
_CSIDL_NETHOOD---------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Network Shortcuts
_CSIDL_TEMPLATES-------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Templates
_CSIDL_APPDATA---------------> C:\Users\<user>\AppData\Roaming
_CSIDL_PRINTHOOD-------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
_CSIDL_LOCALAPPDATA----------> C:\Users\<user>\AppData\Local
_CSIDL_COMMONFAVORITES-------> C:\Users\<user>\Favorites
_CSIDL_INTERNETCACHE---------> C:\Users\<user>\AppData\Local\Microsoft\Windows\Temporary Internet Files
_CSIDL_COOKIES---------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Cookies
_CSIDL_HISTORY---------------> C:\Users\<user>\AppData\Local\Microsoft\Windows\History
_CSIDL_MYPICTURES------------> C:\Users\<user>\Pictures
_CSIDL_ADMINTOOLS------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools

_CSIDL_ALTSTARTUP------------> C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
_CSIDL_COMMONALTSTARTUP------> C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
_CSIDL_PROGRAMFILESX86-------> C:\Program Files
_CSIDL_PROGRAMFILESCOMMONX86-> C:\Program Files\Common Files

_CSIDL_CONTROLS-------------->
_CSIDL_PRINTERS-------------->
_CSIDL_BITBUCKET------------->
_CSIDL_DRIVES---------------->
_CSIDL_NETWORK--------------->
_CSIDL_CONNECTIONS----------->

_CSIDL_WINDOWS---------------> C:\Windows
_CSIDL_SYSTEM----------------> C:\Windows\System32
_CSIDL_PROGRAMFILES----------> C:\Program Files
_CSIDL_SYSTEMX86-------------> C:\Windows\System32
_CSIDL_PROGRAMFILESCOMMON----> C:\Program Files\Common Files
_CSIDL_FONTS-----------------> C:\Windows\Fonts

_CSIDL_COMMONAPPDATA---------> C:\ProgramData
_CSIDL_COMMONSTARTMENU-------> C:\ProgramData\Microsoft\Windows\Start Menu
_CSIDL_COMMONPROGRAMS--------> C:\ProgramData\Microsoft\Windows\Start Menu\Programs
_CSIDL_COMMONSTARTUP---------> C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
_CSIDL_COMMONDESKTOPDIRECTORY> C:\Users\Public\Desktop
_CSIDL_COMMONTEMPLATES-------> C:\ProgramData\Microsoft\Windows\Templates
_CSIDL_COMMONADMINTOOLS------> C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
_CSIDL_COMMONDOCUMENTS-------> C:\Users\Public\Documents

2

主题

-1

回帖

129

积分

一级会员

积分
129
发表于 2013-11-14 20:03:23 | 显示全部楼层
NICE

0

主题

5

回帖

261

积分

二级会员

积分
261
QQ
发表于 2013-11-15 12:03:29 | 显示全部楼层
很实用,谢谢

16

主题

117

回帖

914

积分

三级会员

积分
914
发表于 2013-11-16 09:12:57 | 显示全部楼层
非常实用,楼主辛苦了

0

主题

32

回帖

190

积分

一级会员

积分
190
发表于 2013-11-19 12:20:15 | 显示全部楼层
收藏

0

主题

9

回帖

70

积分

一级会员

积分
70
发表于 2014-9-4 09:06:28 | 显示全部楼层
这个要收藏

0

主题

4

回帖

50

积分

一级会员

积分
50
发表于 2014-10-8 14:45:44 | 显示全部楼层
认真学习

2

主题

9

回帖

86

积分

一级会员

积分
86
发表于 2015-7-24 17:11:59 | 显示全部楼层
MARK 最近可能就要用了

8

主题

56

回帖

464

积分

二级会员

积分
464
发表于 2016-9-8 15:07:36 | 显示全部楼层
这么齐全的收录,还真是难得!!!非常感谢~

30

主题

60

回帖

655

积分

新手入门

积分
655
发表于 2016-12-16 09:13:27 | 显示全部楼层
这个要收藏。

0

主题

14

回帖

101

积分

一级会员

积分
101
QQ
发表于 2017-12-9 10:25:26 | 显示全部楼层
这个必须顶啊

0

主题

14

回帖

101

积分

一级会员

积分
101
QQ
发表于 2017-12-16 21:35:48 | 显示全部楼层
这么齐全的收录,还真是难得!!!非常感谢~这么齐全的收录,还真是难得!!!非常感谢~
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

手机版|未经许可严禁引用或转载本站文章|aardio.com|aardio 官方社区 ( 皖ICP备09012014号 )

GMT+8, 2025-1-13 13:45 , Processed in 0.072945 second(s), 26 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表