
Writing parametr to HKCU to all users
Posted 18 December 2006 - 08:40
There is a task:
My installation must install one file - XLA for MS Excel. And it have to be an entry in the register for proper usage of this file. The point is that each user shall have this value in the HKCU-branch.
But installation runs only one time and HKCU-branch available only for current user, that runs installation.
Q: How can I install the parametr to HKCU-branch of register for every user? Can ADVERTISE help me?
Posted 19 December 2006 - 10:21
Stefan Krüger
InstallSite.org twitter facebook
Posted 20 December 2006 - 08:59
I tried this. And there are what I have:
1. make a single component and place HKCU-registry entry in a component by itself
2. In the same component I create an advertised Shortcut to a key file of this component (single file in component - exe utility).
3. Put this component in a feature by itself - don't placed any other items in this component and feature. Only registry entry and advertised Shortcut.
4. Mark this feature as Favour Advertised.
Then when I install the product and launch advertised Shortcut - it recovers the HKCU-entry, it's OK.
But when a new users logs in and launches Shortcut - the missing entry would not be "repaired". Exe-utility runs only, but not any register repairing would be.
What the wrong is?
Posted 21 December 2006 - 09:57
2.- wrong. Don't put any file in this component. The HKCU registry entry must be the key path of the component.
3. - okay
4. - no need to "favour advertise". I'd recommend "favour local".
Stefan Krüger
InstallSite.org twitter facebook
Posted 21 December 2006 - 12:36
1. make a single component and place HKCU-registry entry in a component by itself
2. In the same component I create an advertised Shortcut. No files in the component - only registry entry and Shortcut.
3. In the Direct Editor I go to Component table and fill fields:
- KeyPath - primary key into the Registry table with my HKCU-registry entry
- Attributes = 4 (msidbComponentAttributesRegistryKeyPath)
4. Put this component in a feature by itself - don't placed any other items in this component and feature. Only registry entry and advertised Shortcut.
5. Mark this feature as Favour local.
But it still doesn't work when a new users logs in.
Edited by nesesser, 21 December 2006 - 12:40.
Posted 22 December 2006 - 04:42
* Put the advertised shortcut in the same component as the EXE file it is pointing to. Make sure this component is in the same feature as the HKCU key.
-Stein Åsmul
Posted 23 December 2006 - 11:13
Stefan Krüger
InstallSite.org twitter facebook
Posted 26 December 2006 - 07:48
I tryed to do it through Direct Editor either through setting "Set key path" in InstallShield. I even tryed to create features per each key (for registry path and for his key separately). It is still doesnt want working =(((
I think it would be very helpfull to give a link in http://www.msifaq.com/a/1011.htm to instance MSI package. Then it would be easy to find out what the point is =)
anyway, thnks for your support =)
Posted 26 December 2006 - 15:27
Self repair will work if you satisfy these requirements:
* Put all per user / registry entries in a separate component
* You need an advertised entry point to trigger self repair. I assume your setup has an advertised shortcut? If so add the per user component to the same FEATURE where the component that holds the advertised shortcut is located.
* The component that holds the shortcut must obviously be installed as part of the main install, and the shortcut MUST be advertised.
* The key path set for the per user component MUST NOT ALREADY EXIST for the user who runs the advertised shortcut. For example, if you set the key path top HKCU\Software\YourCompany\YourApp\Installed = 1, then self repair will never run if this value exists. Make sure you point to a non-existing, unique path for each setup you deliver. I often use HKCU\Software\YourCompany\YourApp\Installed = [ProductVersion] since this will be a moving target in the registry for every new version of the setup.
* Self repair will not run automatically on user login, but only after the user tries to launch the advertised shortcut (unless you have added the shortcut to the "Startup" folder - which you shouldn't).
PLEASE NOTE: It is normally possible to install Excel plugins to the per machine folder "XLStartup" or similar. I believe Excel loads all addin files found in the folder on launch, and it is therefore not possible to disable the addin like you can when it is registered in the HKCU (per user) registry hive.
ALSO NOTE: If you still want to go with the per user registration in HKCU, add your entry as OPENX (that is don't add a number, just an X - Excel will then rename the entry with the next available number on launch).
Edited by Glytzhkof, 02 November 2014 - 05:21.
-Stein Åsmul
Posted 27 December 2006 - 12:46
By the way, when I add Advertised shortcut to Empty component - as described in http://www.msifaq.com/a/1011.htm - It would be an empty-shortcut, because there are no Key File In the component (there are no files in component at all). And after installation it is not displayed...
Glytzhkof, you are right - I'm trying to install Excel startup file - MyMacros.XLA. I wanted to create HKCU\Software\Microsoft\Office\<Version>\Excel\Options\OPEN
And I was decide using C:\Program Files\Microsoft Office\OFFICE<Version>\XLSTART folder for this purpose.
Thnks for all! Maybe I'll return to this question later. Because similar tasks appear periodically...
Edited by nesesser, 27 December 2006 - 12:49.
Posted 28 December 2006 - 09:44
Stefan Krüger
InstallSite.org twitter facebook
Posted 31 July 2008 - 17:38
I've tried following the instructions but they are not working. Is it because I don't have an executable that will run the repair? The only real shortcut I can add is a help file (.chm).
Posted 02 August 2008 - 15:22
Stefan Krüger
InstallSite.org twitter facebook
Posted 05 August 2008 - 16:16
Thank you in advance.
Posted 12 August 2008 - 19:46
Is there a way to bypass that? Have it create the registry entries without the user being an Administrator?
Posted 13 August 2008 - 06:33
-Stein Åsmul
Posted 13 August 2008 - 15:02
StubPath=msiexec /fuo {88168335-4A62-4053-B839-AF23E8FDEEA6} /qb
Obviously the ActiveSetup is being called because the user is getting the message described on the previous post. What can I change to avoid this? Is it the actual setup that is causing it?
Thanks.
Posted 13 August 2008 - 15:38
-Stein Åsmul
Posted 13 August 2008 - 19:51
Isn't the /fuo parameter suppose to only install user specific settings? The only user specific setting that I see are the registry keys that I'm trying to have ActiveSetup create. I'm not sure where to go from here. Am I using the correct parameters?
Thanks for the reply!
Posted 14 August 2008 - 04:36
-Stein Åsmul
Posted 14 August 2008 - 16:38
Thank you.
Attached Files
Posted 14 August 2008 - 16:42
Attached Files
Posted 16 September 2014 - 10:24
I google search led me here again. It looks like this issue was forgotten, did you get the problem resolved?
-Stein Åsmul