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. I found a key in the...




Topic Options
#78994 - 10/03/01 09:44 PM how to make a reg file to automatically delete a string valu
rgodart Offline
enthusiast

Registered: 02/06/01
Posts: 269
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.

Top
Advertisement
#79062 - 10/04/01 12:20 PM Re: how to make a reg file to automatically delete a string valu
DosFreak Offline
Carpal Tunnel

Registered: 02/04/00
Posts: 3796
Loc: Georgia
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? wink

Top
#79088 - 10/04/01 04:42 PM Re: how to make a reg file to automatically delete a string valu
rgodart Offline
enthusiast

Registered: 02/06/01
Posts: 269
Thanks a lot! Exactly what i was looking for!

Top
#79637 - 10/08/01 05:06 PM Re: how to make a reg file to automatically delete a string valu
DrPizza Offline
newbie

Registered: 03/01/01
Posts: 45
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.

Top
#79690 - 10/08/01 10:47 PM Re: how to make a reg file to automatically delete a string valu
DrPizza Offline
newbie

Registered: 03/01/01
Posts: 45
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.

Top
#79857 - 10/09/01 11:11 PM Re: how to make a reg file to automatically delete a string valu
EddiE314 Offline
Pooh-Bah

Registered: 01/18/00
Posts: 1778
DosFreak's method works flawlessly for me.

Top
#85396 - 11/26/01 08:58 AM Re: how to make a reg file to automatically delete a string valu
clutch Offline
Carpal Tunnel

Registered: 03/29/00
Posts: 3859
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!

Top


Forums
Windows Support Forums
Everything New Technology
Legacy OS
Hardware
Software
Games
Networking
Customization & Tweaking
Security

Linux Support Forums
Everything Linux
Linux Hardware
Linux Software
Linux Games
Linux Networking
Linux Customization & Tweaking
Linux Security

Apple Support Forums
Everything Apple
Recent Topics
older games
by allanonbohe
0 seconds ago
media player version 9
by TerryR
Today at 11:08 AM
need advice about backup my PC
by fpin
10/08/08 06:19 PM
Compaq Presario 061 NO SOUND
by wiccanshadowsoldier
10/08/08 11:49 AM
Mechwarrior 2: Mercanaries
by zanirzrold
10/07/08 07:12 PM
Who's Online
1 Registered (allanonbohe), 202 Guests and 10 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
89250 Members
24 Forums
40902 Topics
170566 Posts

Max Online: 1079 @ 03/12/08 01:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22