I have been learning DOS independently all the time. Accidentally discovered this forum. When I came in, I was so excited that I almost burst into tears: there are still so many like-minded friends...
Just came here and learned a lot of useful things. Hope to learn more from you all in the future.
Today is Mid-Autumn Festival. Wish you all a happy Mid-Autumn Festival.
I often write BAT files. I always create a new text before and save it as.bat. There is always this cumbersome step. So I want to add the new batch file in the right-click new menu.
Searched and found no such article in the forum. Combined with the article of creating CMD I saw yesterday, borrowed the batch of IceCrack in the post "How to add new batch TEST.CMD file in the right-click new menu", (url)http://www.cn-dos.net/forum/viewthread.php?tid=21417&fpage=1&highlight=%E6%96%B0%E5%BB%BA)
Did a little expansion by myself, modified to add "TestBat" batch file in the right-click new.
Here, the name when creating is defaulted to "New MS-DOS batch file" customized to "New TestBat". Unfortunately, I don't know how to remove the word "New".
Hope this can be regarded as a Mid-Autumn gift for you all:
@echo off
cd /d %temp%
echo Windows Registry Editor Version 5.00 >>tmp.reg
echo.>>tmp.reg
:: The following key is used to add "BAT file" in the right-click new
echo >>tmp.reg
echo "NullFile"="" >>tmp.reg
echo @="" >>tmp.reg
echo.>>tmp.reg
:: The following key is used to customize the name of the new bat file, set to "TestBat" here
echo >>tmp.reg
echo @="TestBat" >>tmp.reg
echo "EditFlags"=hex:30,04,00,00 >>tmp.reg
regedit /s tmp.reg
del tmp.reg
exit
Special thanks to IceCrack, his batch is very good, so I don't want to write it myself, forgive me.
Just came here and learned a lot of useful things. Hope to learn more from you all in the future.
Today is Mid-Autumn Festival. Wish you all a happy Mid-Autumn Festival.
I often write BAT files. I always create a new text before and save it as.bat. There is always this cumbersome step. So I want to add the new batch file in the right-click new menu.
Searched and found no such article in the forum. Combined with the article of creating CMD I saw yesterday, borrowed the batch of IceCrack in the post "How to add new batch TEST.CMD file in the right-click new menu", (url)http://www.cn-dos.net/forum/viewthread.php?tid=21417&fpage=1&highlight=%E6%96%B0%E5%BB%BA)
Did a little expansion by myself, modified to add "TestBat" batch file in the right-click new.
Here, the name when creating is defaulted to "New MS-DOS batch file" customized to "New TestBat". Unfortunately, I don't know how to remove the word "New".
Hope this can be regarded as a Mid-Autumn gift for you all:
@echo off
cd /d %temp%
echo Windows Registry Editor Version 5.00 >>tmp.reg
echo.>>tmp.reg
:: The following key is used to add "BAT file" in the right-click new
echo >>tmp.reg
echo "NullFile"="" >>tmp.reg
echo @="" >>tmp.reg
echo.>>tmp.reg
:: The following key is used to customize the name of the new bat file, set to "TestBat" here
echo >>tmp.reg
echo @="TestBat" >>tmp.reg
echo "EditFlags"=hex:30,04,00,00 >>tmp.reg
regedit /s tmp.reg
del tmp.reg
exit
Special thanks to IceCrack, his batch is very good, so I don't want to write it myself, forgive me.
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| redtek | +5 | 2006-11-19 23:41 |

