高手帮忙用vbs编一个按键盘动作的脚本!!!

 我来答
hqzxtc
2008-09-18 · TA获得超过2381个赞
知道大有可为答主
回答量:9455
采纳率:50%
帮助的人:3438万
展开全部
以下是在Win98下自动安装还原精灵的脚本('后面的内容为注释):

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "^{esc}" '调用开始菜单
WScript.Sleep 500
WshShell.SendKeys "r" '打开运行对话框
WScript.Sleep 500
WshShell.SendKeys "c:\h\setup.exe" '安装还原精灵(本来可直接用“WshShell.Run "c:\h\setup.exe"”,但那样会装成试用版!)
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1000
WshShell.AppActivate "还原精灵21st DEMO" '当前窗口
WScript.Sleep 1000
WshShell.SendKeys "{ENTER}" '注册
WScript.Sleep 500
WshShell.SendKeys "q" '输入使用者
WScript.Sleep 500
WshShell.SendKeys "{TAB}" '移至注册码处
WScript.Sleep 500
WshShell.SendKeys "{q 20}" '输入注册码(20个"q")
WScript.Sleep 500
WshShell.SendKeys "{ENTER}" '确认注册码
WScript.Sleep 500
WshShell.SendKeys "{ENTER}" '确认谢谢
WScript.Sleep 500
WshShell.SendKeys "%A" '同意协议
WScript.Sleep 500
WshShell.SendKeys "%N" '是否多操作系统(单)
WScript.Sleep 500
WshShell.SendKeys "%N" '安装模式(c)
WScript.Sleep 500
WshShell.SendKeys "%U" '自定义保护
WScript.Sleep 500
WshShell.SendKeys "%N" '详细设置
WScript.Sleep 500
WshShell.SendKeys "{DOWN}" '移至C盘
WScript.Sleep 500
WshShell.SendKeys "{DOWN}" '移至D盘
WScript.Sleep 500
WshShell.SendKeys " " '不保护D盘
WScript.Sleep 500
WshShell.SendKeys "{DOWN}" '移至E盘
WScript.Sleep 500
WshShell.SendKeys " " '不保护E盘
WScript.Sleep 500
WshShell.SendKeys "{TAB}" '还原方式
WScript.Sleep 500
WshShell.SendKeys "%A" '自动还原
WScript.Sleep 500
WshShell.SendKeys "{TAB}" '移至设置密码处
WScript.Sleep 500
WshShell.SendKeys "a" '设置密码为"a"
WScript.Sleep 500
WshShell.SendKeys "{TAB}" '移至保护设置处
WScript.Sleep 500
WshShell.SendKeys "%I" '防I/O破坏
WScript.Sleep 1000
WshShell.SendKeys "%N" '再次确认密码
WScript.Sleep 1000
WshShell.SendKeys "a" '再次确认密码为"a"
WScript.Sleep 1000
WshShell.SendKeys "{ENTER}" '确认密码
WScript.Sleep 1000
WshShell.SendKeys "{ENTER}" '确认更改
WScript.Sleep 1000
WshShell.SendKeys "%N" '选择重启时间
WScript.Sleep 1000
WshShell.SendKeys "%N" '稍后重启
WScript.Sleep 1000
WshShell.SendKeys "%F" '完成
WScript.Sleep 1000
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\a" '删除运行记录c:\h\setup.exe
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU\MRUList" '删除运行记录列表
WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\HDDGMon" '在任务栏不显示还原精灵图标
Set WshShell = Nothing
Set FSO = CreateObject("Scripting.FileSystemObject")
fso.DeleteFolder "C:\WINDOWS\Start Menu\Programs\还原精灵21st DEMO",True '删除“开始菜单-程序”中的“还原精灵文件夹”
fso.DeleteFolder "C:\h",True '删除“C盘”中的“h文件夹”
fso.DeleteFile "C:\h.vbs",True '删除“C盘”中的“h.vbs文件
Set FSO = nothing
--
2022-12-05 广告
图形化编程简单理解为用积木块形式编程,scratch和python也是其中的一种,属于入门级编程,以其简单生动的画面获得无数学生的喜爱,深圳市创客火科技有限公司是一家做教育无人机的公司,旗下有编程无人机,积木无人机及室内外编队,每款飞机含有... 点击进入详情页
本回答由--提供
百度网友94e93d0
2008-09-17
知道答主
回答量:30
采纳率:0%
帮助的人:0
展开全部
用按键精灵就可以搞定了阿
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式