Hi,

I created an MSI package that sets a HCKU regkey to point to a path like "o:\"
By default the key already exist prior to the installation of the package, but with an incorrect value.
Result is, the package (regkey required) does not self heal because the regkey already exists. only the value is wrong.

When I first manually delete the regkey from the users profile and then start the app. It does self heal and sets the key to "o:\"

Can anyone help me to find the solution for this?

I use ScriptLogic MSI studio to create my packages.

Thanks.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Marcel,
use an Active Setup entry.
Add 3 lines like this to the Registry table:
RegHKLM1 2 SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode] Stubpath msiexec /i [ProductCode] /fu /qn MainComponent
RegHKLM2 2 SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode] Version 1,0,0 MainComponent
RegHKLM3 2 SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode] [ProductName] User Setup MainComponent

replace MainComponent with one of the components of the main feature.

Regards, Nick
Answered 07/23/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
ProductCode]

Hi nheim,

thanks for your reply. THis seems a very good solution.[:)]
Still to understand ok. I would like to ask some more info.
The first line does not work for me. When I run from commandline I get the MSI.exe info screen with options.
When I use : msiexec /fu {productcode} /qn
It works. The registrykey in HKCU is modified to what I need.

Could you please explain what the other 2 lines do?
/fu repairs user specific stuff.
/qn = quiet.

Line 2 : Version, I'm not sure what that is for.
Line 3 : What is that for?

I believe the idea is that when a user logs on, the stubpath command is executed? Is that correct?

Thanks a lot!

Marcel
Answered 07/23/2007 by: Marz28
Senior Yellow Belt

Please log in to comment
0
Hi Marcel,
sorry the first line is wrong. It should read:
RegHKLM1 2 SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode] Stubpath msiexec /fu [ProductCode] /qn MainComponent
The columns look like this:
RegHKLM1
2
SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode]
Stubpath
msiexec /fu [ProductCode] /qn
MainComponent

Line 2 writes the version info. If you have to upgrade the HKCU info, you put in a higher version here and the stuff gets updated.
Line 3 populates the message box, which is displayed the first time the user logs in after deployment. You have seen this before eg. with IE 6 or 7, MediaPlayer etc.

Yes, the stubpath will be executed once.

Regards, Nick
Answered 07/23/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Nick,

Just a thought but wouldn't it be easier/better to add a dummy registry entry in its own component and to the same component add a RemoveRegistry entry to remove the existing registry entry as we're only talking about one single registry entry to be changed?
It would of course be vital to make sure that this component is triggered for a repair from one of the entry points.

hmm don't know if the above approach is clear enuf [;)]
Answered 07/23/2007 by: AngelD
Red Belt

Please log in to comment
0
Hi Kim,
yes of course. Was thinking about it too. Just bthe additional dummy regkey would do, i think.
The existing one could simply be overwritten by the new value, if i red Marcel's post correct.
No need for remove first and create afterwards.
Regards, Nick
Answered 07/23/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Please tell me if I understand correctly:

So first I let my msi create a dummy key:[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Jet\4.0\Engines]
"SystemDB"="DummyValue"
And then in the same component I create a key that removes this dummykey.
Then an other (correct) key to which I trigger selfhealing with the keypath for the registrykey I need?

I think i'm missing something here.....

Thanks
Answered 07/24/2007 by: Marz28
Senior Yellow Belt

Please log in to comment
0
Hi Marcel,

Creating a dummy entry means not a dummy value. Values are never evaluated for installation only exist or not exist of registry entries are.
So the dummy entry should look like:
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Jet\4.0\Engines]
"MyDummyEntry"="Any value you like"

I would replace the registry key to a more appropriate one ex. HKCU\Software\[ProductName]\Custom
Replace MyDummyEntry with the GUID of the component instead (value from the ComponentId column in the Component table for your component).

So if the SystemDB is the registry value you want to replace then take that registry entry and put it into the component you have created holding the dummy entry.
Answered 07/24/2007 by: AngelD
Red Belt

Please log in to comment
0
regkeys dont overwrite if they already exist and are a keypath. Which I am guessing is why Kim mentioned the removal first.
Answered 07/26/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity