本文主要是介绍winxp右键进入dos,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
●1、bat文件的安装方法(右键的名字是“打开命令提示符”)
右键的“打开命令提示符”可以自己定义,只要把代码中的“打开命令提示符”同意换成你想要的
即可;
把下面的代码复制在记事本,保存后重命名为bat后缀的,双击即可添加到右键;
=========================================
@echo off
::右键添加"打开命令提示符"
reg add "HKCR/*/shell/OpenInMsdos" /ve /d 打开命令提示符 /f
reg add "HKCR/*/shell/OpenInMsdos/command" /ve /d "cmd.exe /k cd %%1" /f
reg add "HKCR/Folder/shell/OpenInMsdos" /ve /d 打开命令提示符 /f
reg add "HKCR/Folder/shell/OpenInMsdos/command" /ve /d "cmd.exe /k cd %%1" /f
=========================================
●2、reg文件导入注册表方法(右键的名字是“Dos Here”)
将以下内容复制到文本文档中,重命名为DosHere.reg,双击导入注册表即可,此时会出现
“Dos Here”命令(方便进入DOS窗口);你可以把其中的"DOS Here"改成自己想看到的名字;
==========================================
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT/Directory/shell/cmd]
@="DOS Here"
[HKEY_CLASSES_ROOT/Directory/shell/cmd/command]
@="cmd.exe /k /"cd %L/""
==========================================
●3、inf文件安装方法(右键的名字是“Command Prompt Here”)
将以下内容复制到一个文本文档中,重命名为DosHere.inf,然后右键安装即可,此时在文件夹上
右键会多出一个“Command Prompt Here”命令(方便进入DOS窗口);
=========================================
;
; "Command Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
[version]
signature="$CHICAGO$"
[DosHereInstall]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg
[DefaultInstall]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg
[DefaultInstall.ntx86]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg.NT
[DefaultUnInstall]
DelFiles = DosHere.Files.Inf
DelReg = DosHere.Reg
[DefaultUnInstall.ntx86]
DelFiles = DosHere.Files.Inf
DelReg = DosHere.Reg.NT
[SourceDisksNames]
55="DOS Prompt Here","",1
[SourceDisksFiles]
DOSHERE.INF=55
[DestinationDirs]
DosHere.Files.Inf = 17
[DosHere.Files.Inf]
DOSHERE.INF
[DosHere.Reg]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%DosHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%/rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%/DosHere.inf"
HKCR,Directory/Shell/DosHere,,,"%DosHereAccel%"
HKCR,Directory/Shell/DosHere/command,,,"%10%/command.com /k cd ""%1"""
HKCR,Drive/Shell/DosHere,,,"%DosHereAccel%"
HKCR,Drive/Shell/DosHere/command,,,"%10%/command.com /k cd ""%1"""
[DosHere.Reg.NT]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%DosHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%/DosHere.inf"
HKCR,Directory/Shell/DosHere,,,"%DosHereAccel%"
HKCR,Directory/Shell/DosHere/command,,,"%11%/cmd.exe /k cd ""%1"""
HKCR,Drive/Shell/DosHere,,,"%DosHereAccel%"
HKCR,Drive/Shell/DosHere/command,,,"%11%/cmd.exe /k cd ""%1"""
[Strings]
DosHereName="Command Prompt Here PowerToy"
DosHereAccel="Command &Prompt Here"
UDHERE="Software/Microsoft/Windows/CurrentVersion/Uninstall/DosHere"
==========================================
●备注说明:
应用总结--第1个方法可以在任何文件上右键调出窗口;后面两种方法都只能在文件夹上右键调出“dos窗口”;
第一种方法已经试验过,其余两种还没有试验。
这篇关于winxp右键进入dos的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!