[ Last edited by hackhd on 2008-1-26 at 07:33 PM ]作者: s11ss 时间: 2008-1-26 00:27 fso.writeline ("""explorer""=""xx.exe""")作者: hackhd 时间: 2008-1-26 01:08 这样是不行的。括号内的两个" "是默认的格式中间的是要写入的值
如果连续写入""号,那么VBS就会认为是空并结束了,再后面的内容运行就会出错作者: hackhd 时间: 2008-1-26 01:16 假如这是我要写到文本内的内容
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"mingzi"=“1.exe"
把下面代码存为vbs运行会提示语句未结束
dim wsh
set wsh=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
dir=fso.getspecialfolder(1)&"\"
xie dir&"1.txt"
function xie(where)
If not fso.FileExists(dir&"1.txt") Then
set ini=fso.createtextfile(where, true)
ini.writeline "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]"
ini.writeline ""mingzi"=“1.exe"" '这里会提示语句未结束
ini.close
end if
end function作者: s11ss 时间: 2008-1-26 08:42 ini.writeline """mingzi""=""1.exe"""作者: slore 时间: 2008-1-26 12:27
Quote:
Originally posted by hackhd at 2008-1-26 01:08:
这样是不行的。括号内的两个" "是默认的格式中间的是要写入的值
如果连续写入""号,那么VBS就会认为是空并结束了,再后面的内容运行就会出错