最简单的vbs脚本(求一个很简单的VBS脚本!高分)

本文目录
- 求一个很简单的VBS脚本!高分
- 请教个非常简单的VBS脚本,怎么后台延时启动一个程序,启动后延时在关闭
- 谁能帮我写一个简单的vbs脚本
- 谁能帮我做个简单的VBS脚本
- 求一个简单的vbs脚本,在指定的时间比如12点,向一个指定的窗口发送回
- 求VBS脚本
- 请懂VBS的帮忙写个vbs脚本,很简单的,嘿嘿
求一个很简单的VBS脚本!高分
s=split("aaaaa,bbbbb,ccccc,ddddd",",")
randomize
n=int(rnd()*4)
msgbox s(n)
请教个非常简单的VBS脚本,怎么后台延时启动一个程序,启动后延时在关闭
思路:
1. 用RegWrite将vbs文件名写入开机启动注册表项:
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "ThunderSpy.vbs", "REG_SZ" ’vbs文件名请自己修改
不过写注册表操作可能会被杀软拦截。
2. 等待10分钟
WScript.Sleep 10*60*1000
3. 启动迅雷并隐藏
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cmd /c start C:\Program Files\Thunder", 0 ’自己修改迅雷路径
/c 选项表示执行指定的命令后关闭命令提示窗口(黑窗口)。
第二个参数0表示隐藏应用。
4. 关闭迅雷(杀进程)
两种方法。
DOS命令TASKKILL方法:
Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.run "TASKKILL /IM Thunder.exe", 0 ’自己确认迅雷的进程名
WMI方法:
strComputer="."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList=objWMIService.ExecQuery ("select * from Win32_Process where Name=’Thunder.exe’") ’自己确认迅雷的进程名
For Each objProcess in colProcessList
objProcess.Terminate()
Next
谁能帮我写一个简单的vbs脚本
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "D:\123.BAT"
objShell.Run "cmd /c copy /y %SystemRoot%\system32\KMS.exe C:\Documents and Settings\Administrator\「开始」菜单\程序\启动\"
objShell.Run "D:\456.exe"
objShell.Run "D:\123.BAT"
谁能帮我做个简单的VBS脚本
Set w = WScript.CreateObject("WScript.Shell")
s=inputbox("输入1,2或者q,如果不输入请直接确定/取消。")
if s="1" then w.run "c:\2.exe"
if s="2" then w.run "c:\1.exe"
if s="q" then wscript.exit
if s="" then wscript.sleep(10000):w.run "c:\1.exe"
求一个简单的vbs脚本,在指定的时间比如12点,向一个指定的窗口发送回
i=InputBox ("设置时间",,"23:10")
tt=14400*(TimeValue(i)-Time)*60*1000
WScript.Sleep tt
Set a= WScript.CreateObject("Wscript.Shell")
a.AppActivate "未命名"
a.SendKeys "{enter}"
求VBS脚本
来个简单一点的吧,以下是随机生成密码的脚本,希望能够帮到你!
《script language="VBScript"》
《!--
Function Rnd_Num()
Randomize
Rnd_Num = Chr(Int((57 - 48 + 1) * Rnd + 48))
End Function
Function Rnd_Chr()
Randomize
Rnd_Chr = Chr(Int((122 - 97 + 1) * Rnd + 97))
End Function
//--》
《/script》
《input type="button" value="获得随机数" onClick="MsgBox Rnd_Num() & Rnd_Chr() & Rnd_Num() & Rnd_Num() & Rnd_Chr() & Rnd_Num() & Rnd_Num()"》
请懂VBS的帮忙写个vbs脚本,很简单的,嘿嘿
if time》#17:00:00# and time《 #21:00:00# then
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "c:\abc.exe"
Wscript.sleep 5000
WshShell.SendKeys "{f5}"
end if
Wscript.Quit
’-------------------------
set WshShell = WScript.CreateObject("WScript.Shell")
do
if time》#17:00:00# and time《#21:00:00# then
WshShell.Run "c:\abc.exe"
Wscript.Quit
else
Wscript.sleep 300000
end if
Loop

更多文章:
正则表达式匹配最后一个字符(正则表达式:匹配指定字符后面的字符怎样实现)
2026年10月12日 01:40
gridview控件的常用自定义列有哪些?分别有什么作用?(.net有关的基础问题)
2026年10月11日 23:50
在from子句中可以出现(如何在from 子句中嵌套查询下面的语句在access中出错!)
2026年10月11日 05:20







