Solved

Key re-appears in HKLM after deleting one of its values.

Posted on 2014-09-24
6
209 Views
Last Modified: 2014-10-11
I've got a script that runs during a deployment which deletes a value from a certain Registry key.

The value is called "Stubpath", I delete that from the key "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{26923b43-4d38-484f-9b9e-de460746276c}".

The command, which works fine, is:

%windir%\System32\reg.exe DELETE "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{26923b43-4d38-484f-9b9e-de460746276c}" /v StubPath /f

Open in new window

%windir%\System32\reg.exe DELETE "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{26923b43-4d38-484f-9b9e-de460746276c}" /v StubPath /f

It does delete just fine, however, it appears that this key's name changes to ">{26923b43-4d38-484f-9b9e-de460746276c}" in the same path, and has the same Stubpath value back in it.


This key contains one of the many different references for pinning the Internet Explorer .lnk shorcut to the Start menu. I'm aware of other alternatives such as logon scripts, Imagex, etc., but I'm really trying to get to the core of the issue on this particular situation and be advised on how to fix it.

I appreciate any help here!

Thanks
0
Comment
Question by:garryshape
  • 4
  • 2
6 Comments
 
LVL 38

Expert Comment

by:BillDL
ID: 40345610
What is the on-screen message if you temporarily remove the  /f  ("force" or "delete without prompt") switch from the command and run the script?
0
 
LVL 38

Expert Comment

by:BillDL
ID: 40346069
Here's an oddity that I have to admit I have never noticed in my registry before.  I am on an XP computer right now, but I see the following registry keys down at the bottom of:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components

<{12d0ed0d-0ee0-4f90-8827-78cefb8f4988}
>{22d6f312-b0f6-11d0-94ab-0080c74c7e95}
>{26923b43-4d38-484f-9b9e-de460746276c}
>{60B49E34-C7CC-11D0-8953-00A0C90347FF}
>{60B49E34-C7CC-11D0-8953-00A0C90347FF}MICROS
>{881dd1c5-3dcf-431b-b061-f3f88e8be88a}

The components are for Internet Explorer, Windows Media Player, and Outlook Express.

The only one that exists in the list of keys above these is one that relates to Media Player 6 (an artefact for some kind of backward compatibility in XP even though a much more recent version of Windows Media Player is the default in XP).

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{22d6f312-b0f6-11d0-94ab-0080c74c7e95}

This makes me suspect that the keys with the < and > prefix are backup registry keys.  I have never (as far as I recall) run a REG DELETE command on any of these component keys, although I always configure my computers by tinkering manually in the registry.  I am puzzled by the < prefix on the first one and the > prefix on the rest of the key names though.

Here are the values in the same key as you have, and it obviously refers to IE8 as installed on this XP computer:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\>{26923b43-4d38-484f-9b9e-de460746276c}]
@="Internet Explorer"
"ComponentID"="IEACCESS"
"Dontask"=dword:00000002
"IsInstalled"=dword:00000001
"Locale"="*"
"StubPath"="C:\\WINDOWS\\system32\\ie4uinit.exe -UserIconConfig"
"Version"="8,0,6001,18702"
"LocalizedName"="@C:\\WINDOWS\\system32\\ie4uinit.exe.mui,-21"

I am going to have to research a bit, however by the look of things that key already existed in your registry before running the script, and looks to be a normal condition.
0
 

Author Comment

by:garryshape
ID: 40346130
Yeah that's what I was trying to figure out
Really confusing lol

I guess I will have to resort to a runonce silent, hidden logon script that deletes the IE .lnk from the start menu for the user, if I can't keep it removed via the registry, at least in the meantime. Not a huge deal
0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
LVL 38

Accepted Solution

by:
BillDL earned 500 total points
ID: 40347475
I've done some searching to see if I can find out the purpose of those keys preceded by a < or >, but I cannot find any pages with an explanation.

The keys with the < and > prefix in HKLM exist in HKCU and under my {SID} in HKU.  The only difference between the Current_User and the one under my {SID} key are that they only contain Version and Locale values, whereas the ones under HKLM are more fully populated.

I'm sorry, but this one is beyond my scope of knowledge.
0
 

Author Closing Comment

by:garryshape
ID: 40375080
It appears we just have to accept for now that a logon script would be best to delete the shortcut since this reg key is re-generating.
I have accomplished this with a simple RunOnce script to run cmd file to delete the IE .lnk shortcut.
The registry issue at hand doesn't appear to cause the Windows Media Player to re-generate, however, but that's probably because I'm on WES7.
0
 
LVL 38

Expert Comment

by:BillDL
ID: 40375247
Thank you Garry
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
There's a better way to communicate time sensitive or critical info.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question