Question: We need to create a batch script using the registry to add the cmd prompt as an option in the context menu (right click) but

We need to create a batch script using the registry to add the cmd prompt as an option in the context menu (right click) but also delete it. I know the location of the registry but I'm not sure how the script would look. Any help is appreciated.

We need to create a batch script using the registry to add

Here is one but it does not work:

addcmd.reg ************

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\askvgcmd] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\askvgcmd\command] @="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\shell\askvgcmd] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\askvgcmd\command] @="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\askvgcmd] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\askvgcmd\command] @="cmd.exe /s /k pushd \"%V\""

remcmd.reg ************ Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\Background\shell\askvgcmd]

[-HKEY_CLASSES_ROOT\Directory\shell\askvgcmd]

[-HKEY_CLASSES_ROOT\Drive\shell\askvgcmd]

cmd.bat ***********

@echo off REG IMPORT addcmd.reg REG IMPORT remcmd.reg

3. Use Regedit to put the Command Prompt into the context menu. a. Export your newly created HKEY and create a Batch Script that will Import it into the Registry. 3. Use Regedit to put the Command Prompt into the context menu. a. Export your newly created HKEY and create a Batch Script that will Import it into the Registry

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!