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-07-31 22:26
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to add a right-click menu in batch processing? View 8,836 Replies 33
Original Poster Posted 2006-09-26 09:32 ·  中国 福建 泉州 电信
新手上路
Credits 11
Posts 4
Joined 2006-08-21 19:16
19-year member
UID 60977
Status Offline
Nowadays, there are many green versions of antivirus software on the Internet, which have excellent performance and support online updates. If it can be added to the right - click menu, it can greatly enhance its operability. I don't know how to write this batch processing? Hope all the experts don't begrudge giving advice~~
Floor 2 Posted 2006-09-27 10:30 ·  中国 浙江 湖州 中移铁通
初级用户
Credits 73
Posts 30
Joined 2006-09-18 08:35
19-year member
UID 62944
Status Offline
Something can be achieved by adding something in the registry. You should first study the registry
Floor 3 Posted 2006-09-29 02:24 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Due to time constraints, the specific code will not be given. Here is a reg script for you to check:

Windows Registry Editor Version 5.00






@="c:\\windows\\system32\\cmd.exe %1"

Due to time constraints, it has not been tested.
Floor 4 Posted 2006-09-29 05:01 ·  中国 湖南 娄底 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
The REG of moderator 3742668 seems to be for adding file associations, not adding right - click menu items.
Floor 5 Posted 2006-09-29 06:42 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
『Post 4』:

Moderator 3742668's REG seems to be for adding file associations, not adding right-click menu items.

No investigation, no right to speak. (No investigation, no right to speak. From google:http://translate.google.com/translate_t)
Although the REG script provided at noon had a small issue, missing a ] symbol, it is still useful.
The tested code is as follows:
  
Windows Registry Editor Version 5.00


@="c:\\windows\\system32\\cmd.exe %1"


Save it as Right-click.reg and import it into the registry, then right-click on it and try it.
As for converting to a bat code, there have been multiple discussions in this forum.
Floor 6 Posted 2006-09-29 07:11 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
The moderator is right. I didn't notice the asterisk at [HKEY_CLASSES_ROOT\*\shell].
Floor 7 Posted 2006-09-29 07:29 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
After adding the right - click menu item, the first character has an underline. Is there any way for the moderator to remove it?
Floor 8 Posted 2006-09-29 07:40 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Hey, I'm not familiar with the registry
Floor 9 Posted 2006-09-29 09:03 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline

『Post #7』:

After adding the right - click menu item, the first character has an underline. Is there any way for the moderator to remove it?

The underline is for the need of the shortcut key, but this method cannot register the shortcut key. If you feel that is not good - looking, you can use a method like to get a better visual effect.
Floor 10 Posted 2006-09-29 09:09 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Floor 11 Posted 2006-09-29 09:26 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
However, that hotkey doesn't seem to work. Also, how can I make the underline not show up? Does it mean I can only change the position of the underline instead of deleting it?
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 12 Posted 2006-09-29 09:31 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Upon closer inspection, it was noticed that other right - click menu items all had underlines. The shortcut key is: when the mouse is placed on a file and the menu appears, press Ctrl + the shortcut key...

Just now, it was discovered that the & character originally defines the shortcut key.

[ Last edited by pengfei on 2006-9-29 at 09:42 ]
Floor 13 Posted 2006-09-29 09:34 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Originally posted by pengfei at 2006-9-29 09:31:
On closer inspection, other right-click menu items all have underlines.

  Hehe, that's not the case. Try installing ACDSee. The item "Browse with ACDSee" doesn't have an underline. The same phenomenon occurs in Norton Corporate Edition 10, specifically the "Scan Virus..." item.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 14 Posted 2006-09-30 06:18 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
For antivirus software, simply associating with .exe is just opening the program. Taking Kaspersky as an example, it needs to associate with shellex.dll and start related services.


REGEDIT4


@="{dd230880-495a-11d1-b064-008048ec2fc5}"

@="{dd230880-495a-11d1-b064-008048ec2fc5}"

@="{dd230880-495a-11d1-b064-008048ec2fc5}"

"{dd230880-495a-11d1-b064-008048ec2fc5}"="Scan with Kaspersky Anti-Virus"


@="D:\\AVP6OUT\\shellex.dll"
"ThreadingModel"="Apartment"


@="D:\\AVP6OUT\\shellex.dll"
"ThreadingModel"="Apartment"

第一高手 第二高手

Floor 15 Posted 2006-09-30 06:29 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by namejm at 2006-9-29 09:34:

 Hehe, it's not like that. Try installing ACDSee. The "Browse with ACDSee" item doesn't have an underline. The same phenomenon occurs in Nordun Enterprise Edition 10, that is, the "Scan Virus..." item


 For browsing software like ACDSee, it should be added to the folder right-click, as follows: Browse with WinRAR

REGEDIT4


@="Browse with WinRAR(&W)"

@="C:\\Program Files\\WinRAR\\winrar.exe %1"

@="Browse with WinRAR(&W)"

@="C:\\Program Files\\WinRAR\\winrar.exe %1"

第一高手 第二高手

Forum Jump: