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-01 20:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Regarding the problem of "too many command-line arguments" when using the REG command View 1,495 Replies 3
Original Poster Posted 2006-07-12 17:58 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
Strange, I copied reg.exe from XP to the system32 folder of my WIN2000 system, and it can run. But when I tried to write one, it prompted: "Error: Too many command-line arguments"

Oh... This is also an error?

Explanation: The function is to modify the current value of an existing item in the registry, using the reg add command. I wonder if it's appropriate?

Enter in the command line window of win2000:
reg add HKCU\software\class efg setting\abc offices\my computers usb /v XYZ /d 1,2,3,4,5,6,7,8 /f
Because it's a REG_SZ value, so I didn't add the /t parameter. After pressing Enter, the above prompt appeared???
The path is correct, the item is correct. Please advise...
I tried to change the value, and it's the same prompt. Does it mean that REG doesn't support directories below level 3 under the registry primary key or doesn't support long path sub-item names with spaces?
Using other REG DELETE or REG EXPORT commands to operate this item, the same prompt appears. Please ask where the problem is? Thanks...

[ Last edited by flying008 on 2006-7-13 at 09:12 ]
Floor 2 Posted 2006-07-13 10:24 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
Dizzy... What can I say? So that's how it is... I don't know if I should blame Microsoft for not explaining it in the help or thank the great experts on the Internet...
Does anyone know where the problem is?


[ Last edited by flying008 on 2006-7-13 at 10:26 ]
Floor 3 Posted 2006-07-13 15:41 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Quotation marks
The parameter is up to 10, and all parameters with spaces must be enclosed in quotation marks

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 4 Posted 2006-07-13 16:15 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
Not bad! It's the quotation marks that cause the trouble!
I would like to ask the above-mentioned XD again, what does "up to 10 parameters" mean? I can't find the relevant instructions, so I have to trouble you. Thank you!
Forum Jump: