Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

HKCU Registry Components


5 replies to this topic

schindler-c

schindler-c
  • Members
  • 3 posts

Posted 25 July 2003 - 09:04

Hello

I have several components, which only have registry entries for the HKCU. Now I do not have an entry point for these components - because of this they are not written if a new user is login in.

I am experimenting with vb to create a tool which checks and repair all missing HKCU components after logon of the user.

Does anybody know how I can only check for components that have a key path in HKCU and their key path is missing?

One of my tests was looking for every components but this took hours... laugh.gif

Thanks a lot.
Christian

Edited by schindler-c, 25 July 2003 - 09:10.


Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 26 July 2003 - 12:43

If you are looking to see if your software is installed for a particular user you need only check for a single always present HKCU registry key. It will imply the rest is missing. You can then call the installer to repair the installation.

A thoughtful design of your features and components will allow you to control what the repair will do.


Ian Blake
(Currently Unemployed)

schindler-c

schindler-c
  • Members
  • 3 posts

Posted 26 July 2003 - 16:44

Thanks Ian

Well some packages have other don't have HKCU entries and I don't know them yet. I also only worry about the ones without entry points.

Didn't you made a tool checking just these components?

Thanks

Christian



Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 29 July 2003 - 20:40

My code was very simple.

I created a registry value for the installation under the HKCU hive. This I set as a key value of a component.

This component contained all the preset HKCU registry entries for the package. I also added it to its own feature.

I added code to a systray program I was installing but it could be a stand alone program run at startup or in a setup with a single program it could be added to the startup code of that program.

First I called MsiLocateComponent with the GUID of my component. If the result indicated that is was not installed I then called MsiGetProductCode followed by MsiInstallMissingComponent. This caused the installer to jump into life and install the missing registry component. (This contains no files and is in its own feature so no source media is required).


Ian Blake
(Currently Unemployed)

schindler-c

schindler-c
  • Members
  • 3 posts

Posted 29 July 2003 - 21:55

Hi Ian

thanks for your answer. So you were aware of the GUIDs of the HKCU components?

I wish to make the same but without knowing the GUIDs just check all components installing their key path to HKCU.

Maybe this is not possible... dry.gif
Christian

Edited by schindler-c, 29 July 2003 - 21:56.


huckey

huckey
  • Members
  • 13 posts

Posted 14 August 2003 - 05:01

try using active setup it will solve this little dilemmna

active setup compares registry entries in this branch

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components

HKCU\SOFTWARE\Microsoft\Active Setup\Installed Components

under the Installed Components create a key which is unique ie

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\unique key

under that create a stub path value

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\unique key\stubpath

put a value of whatever you wanna do like

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\unique key\stubpath = regedit /s currentuser.reg

this regedit command will be run on all users that have not got the value already in HKCU