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:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to add a right-click menu in batch processing? View 8,837 Replies 33
Floor 16 Posted 2006-09-30 06:33 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
This seems to be a problem discussed in the Windows section.
第一高手 第二高手

Floor 17 Posted 2006-09-30 07:06 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Another relatively useful one


REGEDIT4


@="Check Disk with CHKDSK(&K)"

@="cmd.exe /k color 0b&CHKDSK.exe&color 0e&echo.&echo Check completed, press any key to exit...&pause>nul&exit"



[ Last edited by fastslz on 2006-9-30 at 07:14 ]
第一高手 第二高手

Floor 18 Posted 2006-09-30 11:59 ·  中国 上海 松江区 电信
铂金会员
★★★★
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 pengfei at 2006-9-29 07:29:
After adding the right-click menu item, the first character has an underline. Is there any way for the moderator to remove it?


Oh, I discussed the menu aesthetics issue before. Look below


REGEDIT4


@="Command Prompt"

@="cmd.exe /k \"cd %L\""

@="Command Prompt"

@="cmd.exe /k \"cd %L\""



Explanation:
(&A) Add shortcut key
Directory is the right menu of the directory folder
Drive is the right menu of the disk device
* is all types
SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} My Computer
cmd] The red cmd value can be 123 randomly, the command value is necessary



REGEDIT4


@="Services(&F)..."

"SuppressionPolicy"=dword:4000003c

@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,73, 00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,63,00,2e,00,65,00,78,00, 65,00,20,00,2f,00,73,00,20,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52, 00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00, 32,00,5c,00,73,00,65,00,72,00,76,00,69,00,63,00,65,00,73,00,2e,00,6d,00,73, 00,63,00,20,00,2f,00,73,00,00,00


@="Manage(&G)..."
"SuppressionPolicy"=dword:4000003c


@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,73,\
00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,63,00,2e,00,65,00,78,00,\
65,00,20,00,2f,00,73,00,20,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6f,00,\
6d,00,70,00,6d,00,67,00,6d,00,74,00,2e,00,6d,00,73,00,63,00,00,00


@="Control(&C)..."

@="rundll32.exe shell32.dll,Control_RunDLL"


@="Devices(&W)..."

@="mmc.exe %%SYSTEMDRIVE%%\\WINDOWS\\SYSTEM32\\devmgmt.msc"


@="Policies(&Z)..."

@="mmc.exe %%SYSTEMDRIVE%%\\WINDOWS\\SYSTEM32\\gpedit.msc"



[ Last edited by fastslz on 2006-9-30 at 12:04 ]
第一高手 第二高手

Floor 19 Posted 2006-09-30 12:56 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
```
Windows Registry Editor Version 5.00




@="{7BA4C740-9E81-11CF-99D3-00AA004AE837}"


@="{C2FBB630-2971-11D1-A18C-00C04FD75D13}"


@="{C2FBB631-2971-11D1-A18C-00C04FD75D13}"


Practical first.
Try right-clicking on a folder.
```
Floor 20 Posted 2006-09-30 21:16 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
Dear all seniors and moderators, you are really beyond my reach... My admiration for you is like a continuous torrent of water!...
I would like to ask another question: How to use batch processing to add two items, "Inverse Selection" and "Select All", to the right-click menu in Windows Explorer? It needs to be usable for both files and folders, which is quite practical, you know...

[ Last edited by flying008 on 2006-9-30 at 21:39 ]
Floor 21 Posted 2006-09-30 21:19 ·  中国 上海 松江区 电信
铂金会员
★★★★
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 3742668 at 2006-9-30 12:56:

Windows Registry Editor Version 5.00




...


This version by moderator 3742668 is actually a misinformation on the network. Although adding copy and move to the folder is convenient, friends who like listening to music are in trouble. When you right-click and select 10.mp3 to add to the playlist, there will be 20 consecutive prompts asking whether to move or copy. If you select 100, it's a big trouble. As far as the players installed on my computer are concerned, adding to the playlist in千千静听, MPC player is the same, and RealPlayer also occasionally has this situation.
第一高手 第二高手

Floor 22 Posted 2006-09-30 21:44 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 245
Posts 103
Joined 2006-06-30 00:00
20-year member
UID 57801
Gender Male
Status Offline
How to use batch processing to add two items, "Inverse Selection" and "Select All", in the right-click menu in Windows Explorer, which is quite practical for both files and folders...
Floor 23 Posted 2006-10-01 03:59 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Originally posted by pengfei at 2006-9-29 07:29:
After adding the right-click menu item, the first character has an underline. Is there any way for the moderator to remove it?

It's possible! The first character below doesn't have an underline!
Windows Registry Editor Version 5.00


@="Open with cmd"


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


[ Last edited by qwe1234567 on 2006-10-3 at 00:40 ]
Floor 24 Posted 2006-10-01 04:03 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
Originally posted by qwe1234567 at 2006-10-1 03:59:

It can be done! The first character below has no underline!


There is still an underline.
Floor 25 Posted 2006-10-01 04:20 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Oh, I forgot to add a ] before looking!
Windows Registry Editor Version 5.00


@="用cmd打开"


@="c:\\windows\\system32\\cmd.exe %1"
Floor 26 Posted 2006-10-01 05:57 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
How is it done? It's similar to the code on floor 3, just adding a line @="Open in cmd"

[ Last edited by pengfei on 2006-10-1 at 06:00 ]
Floor 27 Posted 2006-10-01 09:02 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 28 Posted 2006-10-01 09:40 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Cold...I've already explained very detailedly on floor 18 how to remove that.

The code of moderator qwe1234567 is only associated with files, and some extensions CMD cannot be opened. The code on floor 18 is only associated with folders and drives. cmd.exe /k "cd %L\ that is, the command prompt starts from here, "cd %L" code is wrong in CMD, but in the registry it represents the current folder.

TO flying008
Originally posted by flying008 at 2006-9-30 21:16:
You all great guys and moderators are really beyond reach... My admiration for you is like a continuous torrent of water!...
Another question, how to use batch processing to add "Inverse Selection" and "Select All" two items in the right-click menu in Windows Explorer? It is required to be available for both files and folders. This is quite practical.


Adding "Inverse Selection" and "Select All" two items in the right-click menu cannot be achieved only by modifying the registry, and it is恐怕 very difficult even with the help of other software.
第一高手 第二高手

Floor 29 Posted 2006-10-01 11:59 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Moderator 3742668, this is actually a misinformation on the internet. Although adding copy and move to folder is convenient, friends who like listening to music are in trouble....

This is a matter of personal preference. Maybe some people don't like using the "Copy to, Move to" function in the right-click menu, or some people are used to adding tracks from the player and don't like adding too many things in the right-click menu. But these are not important. The important thing is that there are multiple solutions here, and everyone can choose what they need.
How to use batch processing to add two items "Inverse Selection" and "Select All" in the mouse right-click menu in Windows Explorer? It should be available for both files and folders, which is quite practical...

Regarding these two functions, although it is currently impossible to purely implement them by modifying the registry, it is believed that the combination of registry + script can still achieve it. (Personally, I think using Ctrl+A is more refreshing)
Part Select All:

1. Save the following script as *.reg and import it.

Windows Registry Editor Version 5.00


@="Select All(&z)"


@="wscript.exe d:\\Select_All.vbs"


2. Keep the following code as d:\Script.vbs

CreateObject("WScript.shell").SendKeys "^a"

Due to time constraints, I didn't complete the two scripts with one batch processing. You can figure it out yourself.



part Inverse Selection:

1. Registry part:

Windows Registry Editor Version 5.00


@="Inverse Selection(&x)"


@="wscript.exe d:\\Inverse_Selection.vbs"



2. VBS part:

With CreateObject("WScript.shell")
.SendKeys "%e"
Wscript.Sleep 500
.SendKeys "i"
End With



ps: Although the functions of "Select All" and "Inverse Selection" are basically realized, there are still many unexpected situations in the "Inverse Selection" part, so it is recommended to use it with caution.
Floor 30 Posted 2006-10-01 13:13 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
I've learned 2 VBS scripts from moderator 3742668 ^_^
SendKeys "^a" Ctrl+A
SendKeys "%e"
Wscript.Sleep 500
SendKeys "i" Alt+E delay 500 microseconds + I
第一高手 第二高手

Forum Jump: