Jump to content

?'s About Registry Manipulation


xunil76

Recommended Posts

ok, so i have two different .reg files, one that was created before installing a program (CDex), and one created after installing it. i am using a program called ExamDiff Pro to compare the two files to see the differences between them, and want to copy/paste the sections that are different into a 3rd file so that i can easily "reinstall" the program if i decide to do a reformat of windows (using WinXP Pro SP2, btw). i install all my programs to a different partition than my OS, so a reformat will not wipe out all my program files.

anyway, when i view the lines that are different, ExamDiff Pro seems to be adding an extra backslash to some of the paths, but when i locate that string in the actual registry, it only has one.....see the image & code listed below for examples.

in the registry:

registryentry.jpg

in ExamDiff:

"UninstallString"="\"D:\\CDex\\uninstall.exe\""

what i need to know is should i keep the code exactly the way ExamDiff Pro is displaying it when i create my new .reg file, or should i remove the extra backslashes ?

Link to comment
Share on other sites


The uninstall info is not exactly the same as the install info, is it?

What I normally do is simply find the registry key for the software (usually in HKCU) and just export the reg key.

Then when you re-install, simply import it back.

For CDex, isn't it freeware, so why bother with all this?

Link to comment
Share on other sites

no, i realize that the uninstall and install info is different.....but if i include *all* the registry info that was changed by the installation of the program, it seems to reason that if i did want to uninstall the program later, that i would be able to do so just as easily as if i had installed the program using the .exe file, correct?

the stuff i posted was just an example of what i was talking about, to illustrate the differences i was seeing between what the registry shows and what ExamDiff Pro shows.

when you install programs on a different partition like i do, you could easily just create a ghost image of the OS partition, which will contain all the registry entries needed to make the programs work again, but what happens to all the programs that are installed *after* that ghost file was created? they don't work anymore.

what i plan on doing is creating a ghost image of *only* the OS (with drivers/windows updates/etc. installed on the same partition) to quickly & easily "reinstall" the base OS, then make a .reg file for every program i install, which contains only the differences in the registry after that particular program was installed & its preferences set the way i like. that way, if i decide *not* to "install" a program the next time i reformat, i just simply don't import that program's .reg file into the registry.

Link to comment
Share on other sites

No, you shouldn't remove those backslashes.

They are added when the uninstall string, contains spaces. The string is executed as a command and will not work if there is spaces in the command string without quotes.

i.e "F:\folder\filename.exe" would show in the registry as F:\folder\filename.exe

and therefore execute this command

F:\folder\filename.exe

whereas

"F:\folder\file name.exe" would show in the registry as F:\folder\file name.exe and execute this at the command

F:\folder\file name.exe.

You would then get an error because the command you wanted should have been

"F:\folder\file name.exe"

due to the spaces

When the strings are added to the registry in a reg file there are some 'special characters', one of which is a quotation mark. So as not to confuse the registry you need to let it know first, you do this by saying \, meaning, I'm about to include a 'special character'.

Therefore

to tell it to use the command

"F:\folder\file name.exe"

the registry data would need to say "F:\folder name.exe" so your reg file would say

"\"F:\folder\file name.exe\""

Now that doesn't look like your string still, that's because the \ is a 'special character' too. So to also prevent confusion in your reg file you need to let it know you're adding a 'special character' again i.e. \

End result

"\"F:\\folder\\file name.exe\""

It's not an easy thing to explain, but I hope it helps.

PS

Just one thing to add before I leave. When you install your programs and monitor the registry, you should also monitor the %SystemDrive% too. Some of your apps will add dlls, ocxs etc. there too, without which the progs will also not work.

Now it is getting complicated isn't it...!

Link to comment
Share on other sites

yeah, i knew about monitoring the C:\ drive for changes also...WinDiff has an option for comparing directories

thanks for the reply, the thing with the slashes was really the only thing i was unsure about

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...