Add Command Prompt Here Context Menu


Easy fast administration means less stress. This nifty script aims to save you some time.  This adds the right click context menu to all folders in explorer ‘cmd prompt here’. When you click this option a command prompt with the current directory will be displayed. This is a very useful tool for administrative functions and saves you the time of opening a command prompt and changing directory to the folder you need. Additionally, it gives you a really easy way to walk a user through opening a command prompt window when you need them to run something like ipconfig over the phone. This is a visual basic script and runs silently, so it can be deployed by login script, or GPO as well as kaseya. Just save it as a .vbs.

Dim WSHShell
Set WSHShell = WScript.CreateObject(“WScript.Shell”)
WSHShell.RegWrite “HKCR\Folder\Shell\MenuText\Command\”, “cmd.exe /k cd ” & chr(34) & “%1″ & chr(34)
WSHShell.RegWrite “HKCR\Folder\Shell\MenuText\”, “Cmd Prompt Here”

For Kaseya, save the above as cmd_here.vbs, and upload it to the server. Import this script and change the red location to match the location of the file on your server.

Script Name: cmd here
Script Description: Adds ‘cmd here’ to the context menu of explorer
IF True
THEN
Write File
Parameter 1 : c:\temp\cmd_here.vbs
Parameter 2 : admin\VBS\cmd_here.vbs
OS Type : 0
Execute File
Parameter 1 : c:\WINDOWS\system32\wscript.exe
Parameter 2 : c:\temp\cmd_here.vbs
Parameter 3 : 3
OS Type : 0
ELSE

, ,

  1. No comments yet.
(will not be published)