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

Writing parametr to HKCU to all users


26 replies to this topic

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 18 December 2006 - 08:40

Hi all.
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?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 December 2006 - 10:21

How do I add HKEY_CURRENT_USER registry entries to all profiles?
http://www.msifaq.com/a/1011.htm

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 19 December 2006 - 11:32

Thnks a lot! That is it!

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 20 December 2006 - 08:59

Hmm, I'm confused a little.
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?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 21 December 2006 - 09:57

1. - good.
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".

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 21 December 2006 - 12:36

I'm in panic =((((

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.


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 22 December 2006 - 04:42

* Put the HKCU entries in a separate component. Set a proper registry keypath into HKCU.
* 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.

Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 December 2006 - 11:13

You don't have to use the direct eitor to make a registry entry the key path of a component. You can do this by right clicking the registry entry.

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 26 December 2006 - 07:48

It doesn't matter. Anyway It doesnt want working.
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 =)

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

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.

Regards
-Stein Åsmul

nesesser

nesesser
  • Full Members
  • 62 posts

Posted 27 December 2006 - 12:46

I'm giving up. It seems that I doing something wrong.
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.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 December 2006 - 09:44

Your shortcut must point to an executable, which must be the key path of a component, this component should be in the same feature as the registry component. The registry entry must be key path of the registry component. The shortcut to the executable must be advertised. You must launch your application from this advertised shortcut. If this doesn't work a log file might tell you what's going wrong.

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 31 July 2008 - 17:38

What if my setup does NOT contain an executable? I develop spelling plug-ins that integrate with existing applications. The speller's settings are saved to HKCU and I can't seem to get the setup to create entries for each user. In result the speller cannot retrieve the settings and behaves erratically. I cannot save the settings to HKLM.

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).


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 August 2008 - 15:22

There are other ways to trigger the health check, like OM activation. But this is all just a workaround, not really a solution. So you'd better use a logon script or startup program that creates these registry entries.

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 05 August 2008 - 16:16

I am not familar with these proecedures. A logon script sounds like it would do the job. Can I do this using InstallShield? Can you point me to a good source of information on how to integrate this?

Thank you in advance.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 05 August 2008 - 17:11

Try Active Setup: http://etlengineerin...activesetup.txt

Regards
-Stein Åsmul

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 12 August 2008 - 19:46

ActiveSetup seems like the right solution. However on some machines, users are getting the "You must be a member of the local Adminstrators security group..." message. The registry entries were not created.

Is there a way to bypass that? Have it create the registry entries without the user being an Administrator?


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 13 August 2008 - 06:33

There is no requirement for admin rights to use ActiveSetup that I know of. It must be the script, EXE or tool you run via ActiveSetup which triggers the error.
Regards
-Stein Åsmul

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 13 August 2008 - 15:02

Since my app is a plug-in it does not have an .exe copied to the machine. I'm using the following entry on both HKLM and HKCU.

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.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 13 August 2008 - 15:38

Yes, your setup is triggering the error. Check for any LaunchCondition items such as AdminUser or Priviledged or for any SelfReg entries or other actions that would require admin rights.
Regards
-Stein Åsmul

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 13 August 2008 - 19:51

I do not use a setup wide LaunchCondition, however, most components have install conditions depending on the native app's version found on the machine. I also use the LockPermissions table to create registry keys that can be accessed by "Everyone".

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!


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 14 August 2008 - 04:36

Any chance you can zip up the MSI and attach? Difficult to know where the error is coming from, but it is usually quick to see when you have the MSI.
Regards
-Stein Åsmul

vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 14 August 2008 - 16:38

Sure thing. MSI is attached although I had to remove the files the setup copies to client machine in order to make it under 500KB. Not sure if this is going to work then.

Thank you.

Attached Files



vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 14 August 2008 - 16:42

The following three posts containg the files to complete the setup.

Attached Files



vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 14 August 2008 - 16:42

2 of 3

Attached Files



vaqueros

vaqueros
  • Full Members
  • 53 posts

Posted 14 August 2008 - 16:43

3 of 3
Thank you!

Attached Files



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

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?


Regards
-Stein Åsmul