For this example I am using Format Factory which can be found here *http://www.formatoz.com/*
I have 3 folders named "App", "Data", and "Other".
In the App folder I have all the program files.
In the Data folder the registry keys are kept.
In the Other I have the source for the batch file.
And the batch file in outside of all these folder's.
First I found out what registry keys the app used using RegFromApp and decided which ones matter and which ones didn't. Then I saved the Reg file for later use. Then I created this batch file using those registry keys i found.
Batch:
Code: Select all
cd Data
regedit /e "Backup.reg" "HKEY_CURRENT_USER\Software\FormatFactory"
regedit /s "delete.reg"
REGEDIT /s "Settings.reg"
cd %~dp0/app
start /wait FormatFactory.exe
cd %~dp0\Data
regedit /e "Settings.reg" "HKEY_CURRENT_USER\Software\FormatFactory"
regedit /s "delete.reg"
regedit /s "Backup.reg"
First it create's a backup of the old registry keys then runs "Delete.reg" which looks like this
Code: Select all
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\FormatFactory]
I then use Quick Batch File Compiler *http://www.abyssmedia.com/quickbfc/* to compile the script to an ghost exe to run it so the console doesn't come up. You can also use Resource Hacker *http://www.angusj.com/resourcehacker/* to get the icon from the original exe.
What I need help with is is there any way to delete folders the program
makes in user documents for both xp and vista, or do I have to use
Code: Select all
%username%\My Documents[/code
and
%username%\Documents
Also...
Is there a way to backup multiple registry keys to one reg file or do I
have to backup each one individually as backup1.reg, backup2.reg...ect