Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: CREATE A REGISTRY KEY WITH A BATCH FILE?  (Read 18286 times)

0 Members and 1 Guest are viewing this topic.

Nathansswell

    Topic Starter


    Rookie

    Thanked: 1
    • Yes
    • I make music!
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
CREATE A REGISTRY KEY WITH A BATCH FILE?
« on: November 28, 2011, 02:24:00 AM »
Hey, I was wondering how, or even if, you can make a subkey in the HKCR registry section with a batch file.
I've tested a lot of codes and have failed at them all, so I came here.

This does not work:
@echo off
REG ADD "HKCR\batfile\shell\New Key" /F
exit


If I was trying to create the New Key in the code above, it wouldn't work.
I'm using Windows Xp OS with 20GB hard drive on port "E:\" with 3GB used up.
I don't want to create a seperate .reg file either.
Thanks for your help.                                                                  -Nathansswell

Nathansswell

    Topic Starter


    Rookie

    Thanked: 1
    • Yes
    • I make music!
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Re: CREATE A REGISTRY KEY WITH A BATCH FILE?
« Reply #1 on: November 28, 2011, 04:34:47 PM »
EDIT: The code above did work, I just needed to logoff to make it work. My new problem is that I need to find out how to edit the (Default) Value in the subkey with a batfile. Please help...
« Last Edit: November 28, 2011, 04:58:20 PM by Nathansswell »

oldun

  • Guest
Re: CREATE A REGISTRY KEY WITH A BATCH FILE?
« Reply #2 on: November 28, 2011, 08:28:03 PM »
REG ADD "HKCR\batfile\shell\New Key" /F /ve /t reg_sz /d NewValue