|
chishingchan
银牌会员
    
积分 1282
发帖 538
注册 2002-11-2
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
Originally posted by fastslz at 2008-2-19 03:30 PM:
1、批处理计算下一分钟是不精确的(即使做到很精确代码还更复杂),vbs分秒不差
2、残留任务没问题
3、e 快捷方式也没问题
4、也假死现象
5、总之~因个人系统状况而定
1、这个程序无需十分精确,可提前执行几秒或缓迟几秒都不在话下!
2、我的问题就是不想存在已过时的任务计划或留下执行痕迹。
3及4、这个可能跟我的系统有关(用BeTwin拖机中...)
Originally posted by fastslz at 2008-2-19 03:30 PM:
1. Batch processing for calculating the next minute is not precise (even if made very precise, the code will be more complicated), while VBS is accurate to the second.
2. Residual tasks are no problem.
3. The E shortcut is also no problem.
4. There is also a situation of unresponsiveness.
5. In short~ It depends on the individual system conditions.
1. This program does not need to be very precise. It can be executed a few seconds in advance or delayed a few seconds without any problem!
2. My problem is that I don't want to have outdated task plans or leave execution traces.
3 and 4. This may be related to my system (using BeTwin to share the screen...).
|
|
2008-2-19 15:35 |
|
|
chishingchan
银牌会员
    
积分 1282
发帖 538
注册 2002-11-2
状态 离线
|
『第 17 楼』:
再次说明一下 e 快捷方式的问题
使用 LLM 解释/回答一下
这个情况第一次运行进入 SYSTEM 帐户后,注销 SYSTEM,按 Ctrl + Alt + Del 两次用 Administrator 帐户登录是才不见了此快捷方式的。请其它朋友测试一下顶楼代码是否存在这样的情况。
After the first run and entering the SYSTEM account, log out of SYSTEM, press Ctrl + Alt + Del twice, and log in with the Administrator account to make this shortcut disappear. Please other friends test whether the code on the top floor has such a situation.
|
|
2008-2-19 15:45 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
Set WsShell = CreateObject("WScript.Shell")
Set objWMI = Getobject("Winmgmts:")
Set Process=objWMI.ExecQuery("Select * From Win32_Process Where Name='Explorer.exe'")
For Each objProcess In Process
intReturn = objProcess.Terminate(1)
Next
WsShell.Run ("%Comspec% /c "&Chr(34) &"sc config Schedule start= auto&net start Schedule" &Chr(34)),vbHide
Wscript.sleep 1000
SithTime = FormatDateTime (DateAdd("s",20,Time) ,0)
WsShell.Run ("%Comspec% /c "&Chr(34) &"at " &SithTime & " /interactive %SystemRoot%\Explorer.exe" &Chr(34)),vbHide
Wscript.sleep 30000
WsShell.Run ("%Comspec% /c "&Chr(34) &"at /delete /yes&echo 查看是否执行成功&pause" &Chr(34))'
Originally posted by chishingchan at 2008-2-19 12:24:
rem 添加一个任务计划(下分钟起执行)
at %h%:%m% /interactive %SystemRoot%\Explorer.exe>nul 2>nul
rem 延时删除全部任务计划
call :ProcDelay 800
......
下分钟起执行at,call :ProcDelay 800也就是等于延迟8秒后删除全部任务计划(不就是没执行at计划就被删除了)
Set WsShell = CreateObject("WScript.Shell")
Set objWMI = Getobject("Winmgmts:")
Set Process=objWMI.ExecQuery("Select * From Win32_Process Where Name='Explorer.exe'")
For Each objProcess In Process
intReturn = objProcess.Terminate(1)
Next
WsShell.Run ("%Comspec% /c "&Chr(34) &"sc config Schedule start= auto&net start Schedule" &Chr(34)),vbHide
Wscript.sleep 1000
SithTime = FormatDateTime (DateAdd("s",20,Time) ,0)
WsShell.Run ("%Comspec% /c "&Chr(34) &"at " &SithTime & " /interactive %SystemRoot%\Explorer.exe" &Chr(34)),vbHide
Wscript.sleep 30000
WsShell.Run ("%Comspec% /c "&Chr(34) &"at /delete /yes&echo 查看是否执行成功&pause" &Chr(34))'
Originally posted by chishingchan at 2008-2-19 12:24:
rem Add a task plan (execute starting next minute)
at %h%:%m% /interactive %SystemRoot%\Explorer.exe>nul 2>nul
rem Delay to delete all task plans
call :ProcDelay 800
......
Execute at starting next minute, call :ProcDelay 800 is equal to delaying for 8 seconds to delete all task plans (that is, the at plan is deleted before it is executed)
|

第一高手 第二高手
我的小站
 |
|
2008-2-19 15:58 |
|
|
chishingchan
银牌会员
    
积分 1282
发帖 538
注册 2002-11-2
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
Originally posted by fastslz at 2008-2-19 03:58 PM:
下分钟起执行at,call :ProcDelay 800也就是等于延迟8秒后删除全部任务计划(不就是没执行at计划就被删除了)
都已经登录 SYSTEM 帐户,这个还用说?!
且顶楼的批处理是连执行痕迹也删除掉了。不相信的话登录 SYSTEM 后可查看任务计划(没有 AT?)。
Last edited by chishingchan on 2008-2-19 at 04:10 PM ]
Originally posted by fastslz at 2008-2-19 03:58 PM:
Execute at starting from the next minute, call :ProcDelay 800 which is equal to delaying for 8 seconds and then deleting all task schedules (that is, the at schedule is deleted without execution)
It has already logged in to the SYSTEM account, do I need to say more?!
Moreover, the batch file on the top floor also deletes the execution traces. If you don't believe it, you can check the task schedules after logging in to SYSTEM (no AT?).
Last edited by chishingchan on 2008-2-19 at 04:10 PM ]
|
|
2008-2-19 16:07 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
@echo off
if "%1" == "hide" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" hide",0)(window.close)&&exit
:begin
>tmp.vbs echo Wscript.echo FormatDateTime (DateAdd("s",20,Time) ,0)
for /f "delims=" %%i in ('cscript.exe //nologo tmp.vbs') do set aDate=%%i
del tmp.vbs
TaskKill /f /im Explorer.exe>nul 2>nul
sc config schedule start= auto>nul 2>nul
net start Schedule>nul 2>nu
at %aDate% /interactive %SystemRoot%\Explorer.exe>nul 2>nul
ping/n 30 127.1.0 >nul 2>nul
at /delete /yes
自己看把这个是精简且不存在时间误差的批处理
```@echo off
if "%1" == "hide" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" hide",0)(window.close)&&exit
:begin
>tmp.vbs echo Wscript.echo FormatDateTime (DateAdd("s",20,Time) ,0)
for /f "delims=" %%i in ('cscript.exe //nologo tmp.vbs') do set aDate=%%i
del tmp.vbs
TaskKill /f /im Explorer.exe>nul 2>nul
sc config schedule start= auto>nul 2>nul
net start Schedule>nul 2>nu
at %aDate% /interactive %SystemRoot%\Explorer.exe>nul 2>nul
ping/n 30 127.1.0 >nul 2>nul
at /delete /yes
```
This is a streamlined batch processing without time errors by yourself
|

第一高手 第二高手
我的小站
 |
|
2008-2-19 16:16 |
|
|
chishingchan
银牌会员
    
积分 1282
发帖 538
注册 2002-11-2
状态 离线
|
『第 21 楼』:
ghost 回一个系统(无拖机),所有情况消失了!
使用 LLM 解释/回答一下
一场口水战结束了,原来是拖机惹的祸!
A flame war ended, it turned out to be caused by dragging a computer!
|
|
2008-2-19 16:21 |
|
|
chishingchan
银牌会员
    
积分 1282
发帖 538
注册 2002-11-2
状态 离线
|
『第 22 楼』:
复 20 楼
使用 LLM 解释/回答一下
代码没有解决切换前等待太长时间,顶楼批处理不存在这个问题。
The code does not solve the problem of too long waiting before switching, and the batch processing in the top post does not have this problem.
|
|
2008-2-19 16:25 |
|
|
zgren1979
初级用户
 
积分 52
发帖 24
注册 2006-11-16
状态 离线
|
|
2008-2-21 16:39 |
|