中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-11-11 15:09
47,815 topics / 349,930 posts / today 0 new / 48,291 members
DOS批处理 & 脚本技术(批处理室) » [Share] Batch Program for Hiding Processes and Switching System Users
Printable Version  2,793 / 22
Floor16 chishingchan Posted 2008-02-19 15:35
银牌会员 Posts 538 Credits 1,284
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...).
Floor17 chishingchan Posted 2008-02-19 15:45
银牌会员 Posts 538 Credits 1,284
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.
Floor18 fastslz Posted 2008-02-19 15:58
铂金会员 Posts 2,315 Credits 5,493 From 上海


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)
Floor19 chishingchan Posted 2008-02-19 16:07
银牌会员 Posts 538 Credits 1,284
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 ]
Floor20 fastslz Posted 2008-02-19 16:16
铂金会员 Posts 2,315 Credits 5,493 From 上海
```@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
Floor21 chishingchan Posted 2008-02-19 16:21
银牌会员 Posts 538 Credits 1,284
A flame war ended, it turned out to be caused by dragging a computer!
Floor22 chishingchan Posted 2008-02-19 16:25
银牌会员 Posts 538 Credits 1,284
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.
Floor23 zgren1979 Posted 2008-02-21 16:39
初级用户 Posts 24 Credits 52
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023