![]() |
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 00:24 |
48,039 topics / 350,124 posts / today 2 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » I wrote a small program that disables the WIN key when running Warcraft, but it keeps giving errors |
| Printable Version 1,249 / 5 |
| Floor1 chenjie815 | Posted 2007-02-05 07:56 |
| 初级用户 Posts 8 Credits 20 | |
|
I'm a newbie, I just started learning batch files. I wrote a small program that disables the WIN key when running Warcraft (very simple), but it keeps giving errors. As soon as I run it, it says "Too many command-line parameters". Please help me take a look, where is the mistake?
@echo off REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout /v Scancode Map /t REG_BINARY /d 00000000000000000300000000005BE000005CE000000000 /f Frozen Throne.exe REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout /v Scancode Map /t REG_BINARY /d /f I've tried a lot of methods. |
|
| Floor2 anqing | Posted 2007-02-05 08:04 |
| 高级用户 Posts 413 Credits 859 | |
|
Isn't the key value wrong?
|
|
| Floor3 chenjie815 | Posted 2007-02-05 08:13 |
| 初级用户 Posts 8 Credits 20 | |
|
I learned this key value this afternoon from other computer tutorials, and I wanted to use this to see whether it works. But CMD says this command line itself is written wrong. I want to ask, how can I write these command lines correctly? If the key value is wrong then forget it, or if anyone knows the correct key value, please tell me, I'd be extremely grateful.
|
|
| Floor4 redtek | Posted 2007-02-05 08:39 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
I'm not familiar with REG, the registry, and that kind of thing, so there's no way I can help you much, brother. Just a small suggestion :)
In the code in post #1, I noticed there is a space here in HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout — there is a space between Keyboard and Layout, right? Try putting quotes around this kind of content containing spaces when using REG to operate on the registry, to tell REG that this is a single "whole", so REG doesn't mistakenly treat the part after the space as a parameter or some command :) "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout" Is Scancode Map the name of the value? If it's also a single name containing a space in the middle, put quotes around it too, like this: "Scancode Map" When dealing with directories, filenames, etc. that contain spaces, you should also put them in quotes, so Windows will correctly recognize them as one "whole" instead of some parameter or something else…… [ Last edited by redtek on 2007-2-4 at 07:40 PM ] |
|
| Floor5 chenjie815 | Posted 2007-02-05 08:54 |
| 初级用户 Posts 8 Credits 20 | |
|
Ah, thank you so much, it's solved. Many thanks, many thanks.
Expert ^_^ |
|
| Floor6 rdingding | Posted 2007-09-28 16:45 |
| 初级用户 Posts 11 Credits 21 | |
|
Seems like it only takes effect after a reboot, right???
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |