- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
vbs下一些取特殊路径的方法总结(Summary of some special paths taken under vbs)
vbs下一些取特殊路径的方法总结(Summary of some special paths taken under vbs)
1, with SpecialFolder constant FSO
The function depends on the SpecialFolder constant FSO is GetSpecialFolder (SpecialFolder), SpecialFolder constant, unfortunately, only 3, 0-2, 0 for WindowsFolder, is your Windows folder, if your system installed in the C drive, then return to the C:\ Windows is the path string. 1 corresponding to SystemFolder, GetSpecialFolder (1) return C:\Windows\system32. 2 on behalf of the temporary folder is not for me to say it?
An example is given below the temporary folder path string:
Dim FSO
Set FSO = CreateObject (Scripting.FileSystemObject) / / FSO object binding
Dim tempfolder
Const TemporaryFolder = 2
Set tempfolder = fso.GetSpecialFolder (TemporaryFolder)
Wscript.Echo tempfolder
You put the above code is saved as a VBS file open try, pop-up your temporary folder in the path. This string is stored in the variable tempfolder, understand?
2, take use of the environment variable WshShell
The Wscript.Shell object provides the Environment of a page. Returns the WshEnvironment object. Look at an example:
Set WshShell=Wscript.CreateObject (Wscript.Shell) / / WSH object binding
Set WshSysEnv=WshShell.Environment (Process)
Wscript.Echo WshSysEnv.Item (SYSTEMROOT)
The above code will be saved as VBS files, run the system is not pop up in your path? C:\windows right?
Some people may ask, if you want to take the other path? Depending on your system environment variables, system environment variables and the following:
Name Description
The number of processors running on NUMBER_OF_PROCESSORS computer.
The PROCESSOR_ARCHITECTURE user workstation uses the processor type.
PROCESSOR_IDENTIFIER user workstation processor ID.
The processor level PROCESSOR_LEVEL user workstation.
PROCESSOR_REVISION user workstation processor version.
The operating system used by the OS user workstation.
COMSPEC is used to run the command prompt window command (usually cmd.exe).
The landlord HOMEDRIVE drive
您可能关注的文档
- rl00系列条码秤通用说明书(RL00 Series bar code weighing universal manual).doc
- rj45接头网线打线介绍(Introduction of RJ45 joint cable laying).doc
- rm-588固件华丽、极速、稳定、省电、贝拉导航,自用完美版(Rm-588 firmware, gorgeous, speed, stability, power saving, Bella navigation, for personal use, perfect edition).doc
- robots.txt写法完全攻略(机器人。txt写法完全攻略).doc
- robots.txt写法大全和robots.txt语法的作用(超详细)(Robots.txt writing Daquan and the role of robots.txt Grammar (super detailed)).doc
- rom刷机原理及rom制作技术初探(The principle of ROM brush and the making technology of ROM).doc
- routeros2.9.27配置hotspot(实现web认证(routeros2.9.27配置热点(实现Web认证).doc
- qq空间免费主题插件代码汇总(QQ space free theme plug-in code summary).doc
- rp70 吉他效果器简捷实用测评(Rp70 guitar player simple and practical evaluation).doc
- rs485(rs485).doc
文档评论(0)