China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 16:45
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Ask: How can I use batch processing to block the keyboard and mouse! View 1,635 Replies 9
Original Poster Posted 2006-12-06 00:34 ·  中国 广东 广州 联通
初级用户
Credits 90
Posts 35
Joined 2006-10-23 01:13
19-year member
UID 67781
Gender Male
Status Offline
I want to use a batch script to block keyboard and mouse input!
When the batch script is running, block any key presses and mouse operations?
How should this be achieved?
Floor 2 Posted 2006-12-06 00:41 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
What kind of operation is it that doesn't want users to use the mouse and keyboard?

(Downloading ad plugins or executing "tools" with virus properties?)

(Formatting the user's hard drive?)

(Deleting important data?)

(Or something else?)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 3 Posted 2006-12-06 01:00 ·  中国 广东 广州 联通
初级用户
Credits 90
Posts 35
Joined 2006-10-23 01:13
19-year member
UID 67781
Gender Male
Status Offline
It is equivalent to a reminder tool that automatically closes after a few seconds so that the user can perform operations.
Floor 4 Posted 2006-12-06 01:11 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  I don't understand what purpose the owner wants to achieve.
Floor 5 Posted 2006-12-06 05:25 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Just uninstall the mouse and keyboard drivers, and it'll be fine.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 6 Posted 2006-12-06 05:28 ·  中国 河南 郑州 电信
中级用户
★★
Credits 439
Posts 170
Joined 2006-01-09 20:29
20-year member
UID 48707
Status Offline
Generally, it is the time when necessary updates are needed for Internet café machines. I don't want customers to mess around, so I want to lock the screen.
bat c c++
Floor 7 Posted 2006-12-06 06:12 ·  中国 广东 肇庆 四会市 电信
中级用户
★★
Credits 384
Posts 189
Joined 2005-10-19 13:12
20-year member
UID 43709
Gender Male
Status Offline
Originally posted by a9319751 at 2006-12-6 05:28:
Generally, it is the time when necessary updates for Internet cafe machines need to be done. I don't want customers to move around randomly, so I want to lock the screen.


I have also worked in an Internet cafe before and deeply understand the pain of network administrators.
Floor 8 Posted 2006-12-06 10:17 ·  中国 河南 新乡 联通
新手上路
Credits 12
Posts 6
Joined 2006-12-04 11:27
19-year member
UID 72539
Gender Male
From 河南洛阳
Status Offline
Floor 9 Posted 2006-12-06 23:52 ·  中国 广东 广州 联通
初级用户
Credits 90
Posts 35
Joined 2006-10-23 01:13
19-year member
UID 67781
Gender Male
Status Offline
Basically, it means this, but is the aspect of the 5th floor a bit that?
Floor 10 Posted 2006-12-07 01:42 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Indirectly lock the mouse and keyboard through a screen saver program without calling the API, and set it to allow unlocking after n minutes...

) Start a password-protected screen saver

The screen saver has an extension of.SCR, which is actually an executable EXE file.

Simple programming, VB is fine.

The screen saver must require entering a password to exit. Then use VB to make a timer. After a few minutes, if the password is not entered, it will automatically exit.

As for how to control this few minutes, the VB-made screen saver program can have a startup parameter. Add the number of minutes in the startup parameter.

) How to start the screen saver and make the screen saver run "correctly"?

See if there are any relevant registry entries related to the screen saver. If not, it's better. Just control it with the.SCR (EXE) file.

Or use a.BAT batch program to directly call the.SCR executable file, and add the parameter to set the number of minutes to lock. In this way, the system immediately enters the locking mode of screen saver operation.


) Moreover, this special program with screen saver function developed by oneself can also send some messages to the server when the screen saver is started,
or connect to the server to retrieve the instructions to be executed. In this way, it can also be used for remote control.



(The above ideas are purely nonsense, not verified, just for fun~:)

[ Last edited by redtek on 2006-12-6 at 12:45 PM ]
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Forum Jump: