how to make a reg file to automatically delete a string valu

Here's the thing. When i install autocad 2002 and i take a look in the add/remove program window, all the programs coming after autocad are placed waaaaaaaaaaaaaaay below the autocad entry. I mean there's a gap of 20 cm's.

Customization Tweaking 1789 This topic was started by ,


data/avatar/default/avatar33.webp

269 Posts
Location -
Joined 2001-02-06
Here's the thing. When i install autocad 2002 and i take a look in the add/remove program window, all the programs coming after autocad are placed waaaaaaaaaaaaaaay below the autocad entry. I mean there's a gap of 20 cm's.
 
I found a key in the registry to be the cause. When i delete that key everything is fine.
 
My question is: is it possible to make a reg file that will delete this key when i double click on it? So after a format i don't have to go into HKLM --> software --> microsoft --> windows --> currentversion --> uninstall (or something like that) just to remove that key. (it's a string value, if that matters)
 
 
Thanks
 
[edit]
 
Here's some more details. i exported the key to a reg file:
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5783F2D7-0101-0409-0000-0060B0CE6BBA}]
"DisplayIcon"="C:\\Program Files\\AutoCAD 2002\\acad.exe,-1"
 
 
 
The problem is it tries to display an icon in the add/remove programs window, but fails, which makes a gap appear between that progam and the rest of the list.

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar39.webp

3867 Posts
Location -
Joined 2000-02-04
Here's some examples from the registry files I added to an affinity program to add right-click functionality to pick which processor you wish to run the executable on!:
 
INSTALL
 
[HKEY_CLASSES_ROOT\exefile\shell\Affinity1]
@="Use CPU 1"
 
UNINSTALL
 
[-HKEY_CLASSES_ROOT\exefile\shell\Affinity1]
@="Use CPU 1"
 
See the difference?

data/avatar/default/avatar33.webp

269 Posts
Location -
Joined 2001-02-06
OP
Thanks a lot! Exactly what i was looking for!

data/avatar/default/avatar30.webp

45 Posts
Location -
Joined 2001-03-01
The "@" symbol merely means "the unnamed (default) value".
 
It has nothing to do with the ability to delete keys from a .reg file.
 
Setting values to a blank string is not equivalent to deleting them.

data/avatar/default/avatar30.webp

45 Posts
Location -
Joined 2001-03-01
The problem is, some [many] programs will respond differently to an empty value as opposed to a non-existant value.
 
If I read a REG_SZ from the registry and it's simply not there, the API call will respond differently than if I read it and it's been set to an empty string.
 
In the former case, I might use a default value -- but I probably won't put in a check to see if it's merely empty (it's reasonable to assume that if the value exists then it's meaningful, no?).
 
If the intent is to delete, then you should make certain to delete.

data/avatar/default/avatar29.webp

1778 Posts
Location -
Joined 2000-01-18
DosFreak's method works flawlessly for me.

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
Just wanted to bump this up, as DosFreak's method works great for me. I am about to send out a regkey file to remove a dead key from several systems via SMS at work. Thanks for the tip!