I seem to be having some issues with a MSI file.. I'm currently "repackaging" Microsoft personal folder backup. This is a microsoft MSI with a executable wrapper around it. Extracted the MSI, but now it doesn't install for all users that well. What seems to be the problem:
it's a plugin for Outlook. Outlook checks a specific folder (C:\Program Files\Microsoft Office\OFFICE11\ADDINS) for COM+ addins. However, when the MSI is installed for all users (adding allusers=1 to commandline) the windows installer installs the files in the user profile.
Took another look at the package, tried to create a transform. One way or another, Wfwi isn't able to create a transform. (MS MSI's [:@] ) ..So i decided to edit the msi directly. (Bad practise i know, but i hate working with Orca so what's a man to do? :P) Changed some bad file source paths (e:\office?) and saved the MSI. It seems the package writes a local machine key when installed normally, figured out it needed a current user key to "find" the plugin in the right directory per user. Key:

[HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\Microsoft.OutlookBackup.1]
"FileName"="C:\\PROGRA~1\\MICROS~2\\OFFICE11\\Addins\\outbak.dll"
"FriendlyName"="Outlook Backup Addin"
"LoadBehavior"=dword:00000003

The problem is installing the key per user. Created a CURRENTUSER feature in the MSI, at the top of the feature tree (parent) and the standard feature under that. The package seems to work now. (if another user logs on, outlook loads the plugin, it is selectable etc.) However, when removing the program, the currentuser keys, created by the currentuser feature, aren't removed. Did i miss something when creating the current user feature, or do i have to add or change someting to the registry/installexecutesequence table within the MSI or something? TIA
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 Neo,
installation and deinstallation allways take place in the environment of the logged on user or in the system accounts environment, if you do a machine GPO-Install. If you don't do some special threatment to the different user profiles, the uninstall of the CU things will also be done only in the profile of the logged on user. The Hives of the other users are not even loaded at this time. This isn't solveable that easy.
Regards, Nick
Answered 10/09/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Hmm, okay, i see.. I understand Windows installer can't remove currentuser keys if they are in a hive that isn't loaded. But, isn't there *any* way to circumvent this? Only thing i can come up with is creating an (separate) uninstall package which runs an autorepair at logon (removing the keys) but this doesn't seem like a desirable solution. Anyone have any suggestions? Ways of not using currentuser keys or replacing them somehow?
Answered 10/09/2006 by: neo2000
Purple Belt

Please log in to comment
0
Hi Neo,
the idea you got, seems the only one for me too. I've never done that, as i leave the trash in the profiles, when uninstalling.
Are you really sure, you need that? Have never seen any comercial app, which does this.
You could check with your next version or upgrade for the keys and remove it then.
Regards, Nick
Answered 10/10/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Unfortunately, i don't seem to have a choice.. Outlook checks if the key exists.. If it does and contains a value, but the file isn't there (because of the uninstall) it shows an error message. The uninstall does remove the key if it exists with the current user/user logged on at that moment, so what you said makes sence. :) Well, just have to make sure that SMS runs the install only when a user is logged on.. :P
Another thing i can come up with, is check with our GPO guy to see if he has any ideas on this. I'm afraid not, but it's worth having a look at. Thanks!
Answered 10/10/2006 by: neo2000
Purple Belt

Please log in to comment
0
Add a active setup during uninstall to remove the user specific stuff.
Answered 10/10/2006 by: AngelD
Red Belt

Please log in to comment
0
I Agree with AngelD.

Step 1

Write an Unisntall VBScript that removes Current User keys. Include Uninstall.vbs in the package and make it a permanent component (This script will run once package is uninstalled).

Step 2

Create a Type 38 Custom action, with the following settings:
• Run Synchronous
• Deferred Execution
• Just before InstallFinalize
• Set Condition to REMOVE~=”ALL”

Insert the following Script into the Custom Action

Set objShell = CreateObject("WScript.Shell")

strProductCode = Session.Property("ProductCode")

strReg = "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\" & strProductCode & "Uninstalled" & "\StubPath"
strVal = "<Path to your Uninstall VBScript that removes Current User Keys>"

objShell.RegWrite strReg, strVal


Hope this helps
Answered 10/11/2006 by: janoon
Senior Yellow Belt

Please log in to comment
0
Have a look at Ed Tippelt's excellent implementation
Active Setup and how to implement it

Change "YourActiveSetup.exe" to your vbscript in the value for the StubPath.
Answered 10/11/2006 by: AngelD
Red Belt

Please log in to comment
0
Be careful when using Active Setup as in your case it will run when application is installed resulting in deleting the HKCU keys for each user logging onto machine.

Use the Custom Action I've mentioned above and it will set the Active Setup after application is uninstalled.
Answered 10/12/2006 by: janoon
Senior Yellow Belt

Please log in to comment
0
Well, you could condition the component to only install during uninstall (REMOVE~="ALL")
Answered 10/12/2006 by: AngelD
Red Belt

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