I'm trying to make a Battlefield 2 Key changer.
When the 'Change Key' button is pressed I want it to add the text in the text box to the specified location in HKEY_LOCAL_MACHINE\Software.
At the moment I'm using a batch file to do this, but it looks boring so I'm trying to make something that looks more exciting.
This is the batch file.
- Code: Select all
@echo off
title Doug's BF2 Key Changer
set key=
set /p key=Please enter your new Key here(Without the hyphens).
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Electronic Arts\EA Games\Battlefield 2\ergc" /ve /t REG_SZ /d x9392%key% /f > NUL
echo.
echo Your Key Has Been Changed. Press Any Key To Exit.
pause >> NUL
del NUL /f /q
I want the same effect to happen when the 'Change Key' button is pressed on the app, then if possible the text to be replace with "Your Key Has Been Changed'
This is what the app. looks like.

If you are able to help me please explain in as much detail as possible so I can learn.
Thanks in advance,
Doug.


