![]() |
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-08-06 23:50 |
48,040 topics / 350,125 posts / today 1 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » How do I use a batch file to record daily operations??? |
| Printable Version 989 / 6 |
| Floor1 xiaohacker | Posted 2007-12-23 20:16 |
| 初级用户 Posts 45 Credits 110 | |
|
Can anyone help me write a batch file like this?
(1) When this batch file is opened, it should start recording the user's operation records while using the computer, and save those files and folders the user opens as shortcuts into a specified folder (I know the system itself will save the user's operation records under the C:\Documents and Settings\Administrator\Recent directory, but this is easy for anyone with a little computer knowledge to notice). (2) When running this batch file, it should run in the background, that is, with no window, and not even minimized on the taskbar. |
|
| Floor2 xiaohacker | Posted 2007-12-23 20:18 |
| 初级用户 Posts 45 Credits 110 | |
|
Sorry, after I posted the new topic, I refreshed three times, and ended up making three duplicate topics. I'm really sorry!!!:(
|
|
| Floor3 mayu2004 | Posted 2007-12-23 20:32 |
| 初级用户 Posts 40 Credits 109 | |
|
I have an idea, just don't know how to do it
If you use vbs to start the batch, it can probably achieve the effect of running in the background, but in the process manager there will be a cmd process You can use the command copy C:\Documents and Settings\Administrator\Recent contents inside, then clear it, and use a delay command to control the copy speed Then keep looping -------------- A bit messy |
|
| Floor4 mayu2004 | Posted 2007-12-23 20:42 |
| 初级用户 Posts 40 Credits 109 | |
|
Hehe, I wrote one
A bit crude, you can modify it yourself ----------------------------- @echo off :a copy C:\"Documents and Settings\Administrator"\Recent\*.* d:\记录\ del /f /q C:\"Documents and Settings\Administrator"\Recent\*.* ping 127.255.255.255 -n 1 -w 5000 >nul goto a ------------------------------------------------- 5000 means looping once every 5 seconds Hope this is the effect you want QQ 236189165 If you run it with vbs, you can achieve the effect of running in the background [ Last edited by mayu2004 on 2007-12-23 at 08:43 PM ] |
|
| Floor5 xiaohacker | Posted 2007-12-23 21:05 |
| 初级用户 Posts 45 Credits 110 | |
|
Thanks to the brother in the previous post for the reply. I thought of doing it this way at first too, but in the end I felt that doing this might waste a bit too much system memory, right? But I'll add credits to you tomorrow, today the credits I've added already exceeded my limit!
|
|
| Floor6 xiaohacker | Posted 2007-12-23 21:42 |
| 初级用户 Posts 45 Credits 110 | |
|
I'm a super newbie. I wrote the VBS file below, but it still won't run. Can someone help take a look
ah!! dim path_1="I:\Documents and Settings\Administrator\Recent" dim path_2="D:\记录" dim processNames,processName processNames=Array("WangWang.exe","QQ.exe","eMule.exe") 'Forbid running WangWang, QQ, eMule, Xunlei, Fetion set FSO=wscript.createObject("scripting.FileSystemObject") set f_1=FSO.getFile(path_1) do call copy() wscript.sleep 2500 call killProcess() wscript.sleep 2500 loop sub copy() 'Function for copying files f_1.copy(path_2) 'Copy the files in the path_1 folder to the path_2 folder end sub sub killProcess() 'Function for forbidding specified processes from running on Error resume next Set objWMIService=GetObject("winmgmts:{impersonationLevel=Impersonate}!root\cimv2") for each ProcessName in ProcessNames Set colProcessList=objWMIService.execquery(" Select * From win32_process where name = '" & ProcessName & "' ") For Each objProcess in colProcessList objProcess.terminate() wscript.sleep 3000 end sub |
|
| Floor7 mayu2004 | Posted 2007-12-24 08:33 |
| 初级用户 Posts 40 Credits 109 | |
|
I don't understand vbs, but if you use a batch file and set the delay a bit higher,
there should be no problem I tested it on my machine the memory can be kept under 5m |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |