我的这个vbs文件要放到启动文件夹中,让计算启动时执行的。但是我想等计算机触发这个文件2分钟之后,才执行里面的代码,想我高手帮我写延时代码。谢谢。
Set WshShell = WScript.CreateObject("Wscript.Shell")
WshShell.Run "%comspec% /c regedit /s C:\windows\mod_reg.reg",0,true
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\腾讯QQ.lnk")
oShellLink.TargetPath = "D:\backup\qq\QQ.exe"
oShellLink.WindowStyle = 2
oShellLink.Hotkey = ""
oShellLink.IconLocation = "D:\backup\qq\QQ.exe, 0"
oShellLink.Description = ""
oShellLink.WorkingDirectory = "D:\backup\qq"
oShellLink.Save
set fso=wscript.createobject("scripting.filesystemobject")
fso.deletefile "C:\windows\mod_reg.reg"
fso.deletefile "C:\Docume~1\Administrator\「开始」菜单\程序\启动\mod_reg.vbs"
───────────────── 版务记录 ─────────────────
执行:HAT
操作:在帖子标题中增加搜索关键字
说明:原标题"请高手帮我加入延时代码,达到延时执行之目的"不利于论坛搜索
处罚:论坛新人免于积分处罚
提示:建议阅读以下帖子
{1415}提问的智慧
{7326}论坛新手必读,所有人的基本行为准则
{22703}请不要做浮躁的人
{32667}那些连标题都写不清楚的人们啊,你们醒醒吧
{32825}本版严厉整顿烂帖
───────────────── 版务记录 ─────────────────
Last edited by HAT on 2008-12-6 at 20:44 ]
My this vbs file wants to put into the startup folder, let the computer start when executing. But I want to wait for the computer to trigger this file for 2 minutes later, just then execute the code inside, want me the expert to help me write the delay code. Thanks.
Set WshShell = WScript.CreateObject("Wscript.Shell")
WshShell.Run "%comspec% /c regedit /s C:\windows\mod_reg.reg",0,true
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\腾讯QQ.lnk")
oShellLink.TargetPath = "D:\backup\qq\QQ.exe"
oShellLink.WindowStyle = 2
oShellLink.Hotkey = ""
oShellLink.IconLocation = "D:\backup\qq\QQ.exe, 0"
oShellLink.Description = ""
oShellLink.WorkingDirectory = "D:\backup\qq"
oShellLink.Save
set fso=wscript.createobject("scripting.filesystemobject")
fso.deletefile "C:\windows\mod_reg.reg"
fso.deletefile "C:\Docume~1\Administrator\「开始」菜单\程序\启动\mod_reg.vbs"
───────────────── Moderation Record ─────────────────
Execution: HAT
Operation: Add search keywords in the post title
Description: The original title "Please help me add delay code, achieve the purpose of delayed execution" is not conducive to forum search
Punishment: Forum newbies are exempt from points punishment
Tip: It is recommended to read the following posts
{1415}The Wisdom of Asking Questions
{7326}Must-read for forum newcomers, basic code of conduct for everyone
{22703}Please don't be an impatient person
{32667} Those people who can't even write the title clearly, wake up
{32825}This version strictly rectifies bad posts
───────────────── Moderation Record ─────────────────
Last edited by HAT on 2008-12-6 at 20:44 ]