新建bat檔的一般方法是用文字編輯器另存為bat檔,
比較麻煩。
可以通過腳本修改註冊表,
在右鍵快顯功能表的“新建”子命令中直接添加“新建bat文件“的功能表項目,
直接新建bat文檔。
@echo off
color 0a
title 右鍵添加新建BAT文件 %date%
echo 正在添加...
::添加BAT格式設定檔
reg add HKCR.batShellNew /v nullfile /f
reg add HKCRatfile /ve /d 批次處理 /f
exit
2 刪除右鍵功能表“新建”子功能表下的命令項Windows系統的右鍵快顯功能表“新建”下面有不少子功能表,
有些是使用者不需要的。
通過下面的腳本,
可以通過修改註冊表來刪除不需要的“新建”子功能表。
@echo off
:: 只要刪除"HKEY_CLASSERS_ROORT.尾碼名"項目下的"ShellNew"鍵就可以了
:: 如果實在刪除不了, 則把"HKEY_CLASSERS_ROORT.尾碼名"刪除掉即可
:: 為什麼不能一次性刪除好幾個尾碼名
:: Code by JM CMD@XP
mode con lines=25
title "新建"功能表內容刪除器
color 1f
:input
cls
call :display
echo 如果要強行刪除, 請選 1
echo 如果要強行刪除Briefcase, 請選 bfc
echo.
echo.
set input=
set /p input= 請輸入尾碼名:
if "%input%"=="" goto input
if "%input%"=="0" exit
if "%input%"=="1" goto fouce
for /f %%i in ("%input%") do (reg delete HKCR.%%iShellNew /f)
goto continue
:fouce
cls
call :display
set input=
set /p input= 請輸入尾碼名(強行刪除):
if "%input%"=="" goto fouce
if "%input%"=="0" exit
for /f %%i in ("%input%") do (reg delete HKCR.%%i /f)
:continue
cls
call :display
echo.
set choice=
set /p choice= 還要繼續清除嗎?(y/n):
if "%choice%"=="" goto continue
if "%choice%"=="y" goto input
if "%choice%"=="" goto :eof
:display
echo.
echo.
echo.
echo.
echo.
echo.
echo 本程式能刪除右鍵功能表中"新建"專案下的多餘內容, 為"新建"菜單減肥!
echo.
echo 如果想讓某種類型的檔不再出現在滑鼠右鍵的"新建"功能表中, 請直接
echo.
echo 輸入該檔案類型的尾碼名。 例如:rar。
echo 壓縮文檔:zip
echo 日記本文檔:jnt(要強行刪除)
echo 連絡人:contact
echo PS文檔:psd(要強行刪除)
echo PPT文檔:pptx(要強行刪除)
echo access資料庫文檔:accdb(要強行刪除)
echo.
echo 退出請選 0
echo.
:bfc
reg delete HKEY_LOCAL_MACHINESOFTWAREClassesBriefcaseShellNew /f