- dim path,code
- set wshshell=createobject("wscript.shell")
- path=wshshell.currentdirectory:code="在"
- set objfso=createobject("scripting.filesystemobject")
- set objtemp=objfso.opentextfile(path&"\temp",2,true)
- set objfile=objfso.getfile(path&"\temp")
- if objfile.drive&"\"<>path then code="不"&code
- wsh.echo "程序"&code&"根目录下"
- objtemp.close
- objfso.deletefile(path&"\temp")
- set objtemp=nothing
- set objfile=nothing
- set obfso=nothing
- set wshshell=nothing
复制代码
[ 本帖最后由 batman 于 2009-4-6 13:56 编辑 ] |