Tuesday, September 1, 2015

Windows Registry for New Menu with Batch Files

How can I add an item to the 'new' context menu?


This shows how to add items to the "New" dropdown menu. How about taking them away?


Also, I want to make a batch file that automates this. Like this:


@echo off
echo Enter you file extension
set /p ext=
copy con ext.reg
echo Windows Registry Editor Version 5.00 >> ext.reg
echo. >> ext.reg
echo [HKEY_CLASSES_ROOT\.%ext%\ShellNew] >> ext.reg
echo "NullFile"="" >> ext.reg
start /wait ext.reg
del ext.reg
echo Complete
exit


  1. Anything wrong with this, in general?

  2. Can you write to other types of non-text files like registry files with batch files?

  3. Please tell me the registry code for removing an item, so that I can add that.

  4. Most importantly, can a registry file interact with the user, like take in input and make a variable so I don't need a batch file at all?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...