通过vbs修改目录名称与快捷方式名称的实现代码
set fso=wscript.createobject("scripting.filesystemobject")
oldfoldername1="263 enterprise messenger"
newfoldername1="peacemap messenger"
oldfilename1 = "263 enterprise messenger.lnk"
newfilename1 = "peacemap messenger.lnk"
oldfilename2 = "卸载 263 enterprise messenger.lnk"
newfilename2 = "卸载 peacemap messenger.lnk"
originalpath="c:\documents and settings\all users\「开始」菜单\程序"
newpath="c:\documents and settings\all users\「开始」菜单\程序\peacemap messenger"
deskpath="c:\documents and settings\all users\桌面"
if (fso.folderexists(originalpath & "\" & oldfoldername1)) then
set fsogetfolder = fso.getfolder(originalpath & "\" & oldfoldername1)
fsogetfolder.name = newfoldername1
end if
if fso.fileexists(newpath&"\"&oldfilename1 ) then
set f=fso.getfile(newpath&"\"&oldfilename1)
f.name=newfilename1
end if
if fso.fileexists(newpath&"\"&oldfilename2 ) then
set f=fso.getfile(newpath&"\"&oldfilename2)
f.name=newfilename2
end if
if fso.fileexists(deskpath&"\"&oldfilename1 ) then
set f=fso.getfile(deskpath&"\"&oldfilename1)
f.name=newfilename1
end if
msgbox "完成!"
上一篇: ASP.NET MVC使用Ninject的方法教程
下一篇: 曹操的儿子那么多 他们的能力如何