cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gridman
Level 8

Writing Per-User Registry Keys

I have a Basic MSI installer and I am working to make it Vista compatible and still work with Win 2000, XP, and 2003. Right now it works with Vista, but not for the others. All the research I have done for the past couple weeks has not gotten me to where I need to be.

In my installer, six of the components have a registry value that needs to be written to HKCU. So, I can't do this at install-time, because I would be asked for admin credentials, and it would then be written to the Admin profile, which I don't want.

I've read that the thing to do is install these components on first use. Fine, but I don't want this to be done by the user clicking on a shortcut. I have six components that this needs to be done for and having six shortcuts in my program group seems silly and an aggravation for the user.

In my Windows app, there are six menu items that correspond to the six components in the installer. What I would like is that when the user first clicks on one of these menu items, the installer would then run and install that component's files and HKCU registry entries. Some threads I have read makes me think this is similar to an Auto-Repair, which I've never done.

Is this possible? If so, can someone point me in the right direction? If not, what do people usually do in this situation?
Labels (1)
0 Kudos
(4) Replies
gridman
Level 8

I ask this because Microsoft does this with some of their programs.

My theory is that in my app, I could check if the registry entries are there. If so, perform the function. If not, call msiexec.exe with some parameter to install that component's files and registry entries.

I'll see if there is such a parameter to do this.
0 Kudos
gridman
Level 8

That theory didn't pan out.

To state it simply, I need to install a component that has files and HKCU per-user registry keys at first-run. Supposedly the way to do this is by triggering an auto-repair. If one of the files is not there, the auto-repair is supposed to be triggered. But I haven't figured out how to do this yet.
0 Kudos
klacounte
Level 6

Can your application do this instead of the install? It seems like the application could check either when it first starts or when the user clicks one of the six menu items whether this is the first time. If "yes" then create the registry keys.
0 Kudos
gridman
Level 8

I see what you mean. I'll try that and see what happens. Thanks.
0 Kudos