I'm packaging a newer version of Java (JRE 1.6.0.22) that's used only by our Oracle users. There's a particular security setting the group would like me to change; that setting is stored in a text file: C:\Documents and Settings\%username%\Application Data\Sun\Java\Deployment\deployment.properties.

Using Wise Package Studio 8 (the Windows Installer Editor), I created a transform to include the usual customizations we do (turn off automatic update checking, for example). Then, following one of jmcfadyen's posts (http://www.appdeploy.com/messageboards/fb.asp?m=24182), I further modified my transform so that I have a feature tree that looks like this:

- Current User
- Complete
- java feature 1
- java feature 2
- java feature 3

I then used the Files page to add the file I need to C:\Documents and Settings\%username%\Application Data\Sun\Java\Deployment. This is in the Current User feature.

So I've got the MSI and the CAB from the original Java exe, and I've got my transform file. When I run the install, the deployment.properties file shows up in the correct place in my user profile, but when I log in with my test account (low-level user, no admin rights), the file isn't there, nor has the folder path been built.

I suspect, based on what I've been reading here, is that it has something to do with HKCU, but I can't piece together what I'm supposed to do next.
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
the component that contains the files in the users profile needs to have HKCU dummy key set as the keypath.

I would recommend something like this

HKCU\Software\[Company]\Packages\[ProductName]\ValidationFix_<componentName> = installed

This will ensure all your fixes for all packages are in the same location for the enterprise.
Answered 11/17/2010 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
1
Ron,

Do remember that you'll also have to trigger the self-heal in some way, either through an advertisement of some sort, or through running an msiexec /fup command line in the user's context. Also I'm not sure (maybe John can confirm this) if the feature structure is actually taken into account when you repair through an msiexec /f commandline...

Rgds,

PJ
Answered 11/18/2010 by: pjgeutjens
Red Belt

Please log in to comment
0
Hello Ron,

I agree with pj .I had created an MST for JRE 1.6.0.21 with settings in the deployment.properties file in the user data.In the test account for this file to appear to its desired location you need to use active setup with /fup cmd since in java the feature is not advertised.Also the file with its settings needs to be copied to userdata.you can place that file in your INSTALLDIR and write a script to copy it in userdata during logon(active setup).

regards MM
Answered 11/18/2010 by: mayur_mak
Senior Purple Belt

Please log in to comment
0
sorry I missed this, yes I agree if there is no entry points you will need Active Setup.
Answered 11/25/2010 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
ORIGINAL: jmcfadyen

the component that contains the files in the users profile needs to have HKCU dummy key set as the keypath.



I'm confused. I can't figure out how to do this. I created a registry key:

[HKEY_CURRENT_USER\Software\Packages\JRE622FinanceOnly]
"ValidationFix_{26A24AE4-039D-4CA4-87B4-2F83216022FF}"="installed"


I see in Wise Package Studio 8 how I can set that as a key, but I don't understand how setting that reg entry as a key is related to the file I wanted copied into each user's profile area (the deployment.properties file).
Answered 12/01/2010 by: RonW
Green Belt

Please log in to comment
1
you need to ensure that the registry entry is in the same component as the file and marked as the keypath.

You can either goto the registry table and find the key and change the component_ column to the same name as the file component.

alternatively you can goto the component from the component tab page and add the key to the exact component.

once the regkey is in the correct component goto the component view and right click the key and set as "keypath"

alternatively goto the component table find the component and use the regkeys primary key value in the last column of the component table.
Answered 12/01/2010 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
Almost have this working. To review, my goal is to have a Java configuration file (deployment.properties) copied into each user's profile area when they log onto a PC. The file copies to the correct location for each user, but the self-heal is replacing more files than just the one I want to copy.

My feature tree looks like this:
CurrentUser
- Complete
- Feature 1
- Feature 2
- Feature 3

The three features are from the original Java install.
In the CurrentUser feature I have the file I want to copy over, and a registry entry([HKEY_CURRENT_USER\Software\Packages\JRE622FinanceOnly]
"ValidationFix_deployment.properties=installed").

Both the file and the registry entry are in the same component, and the registry entry is marked as the keypath.

I'm triggering the self-heal with ActiveSetup, using the following registry entry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{87AC6F5E-7B11-4270-9CDD-74FEA1E34CCD}]
"ComponentID"="Java For Finance Only_deployment.properties"
"StubPath"="%windir%\\system32\\msiexec.exe /fup {26A24AE4-039D-4CA4-87B4-2F83216022FF} /qb"
"Version"="1"

When I install the app, the initial install is correct. And when I log in as a different user, I see the self-heal trigger, and the file deployment.properties gets copied to the correct path in the user profile.

But here's the problem: when I log in as a different user, I see the self-heal trigger, but in addition to copying the file I want to the user profile area, it's replacing everything in C:\Program Files\Java\jre6 with the files that are listed in the Files table of the MSI, which is a zip file, a couple EXEs, and a couple DLLs.

Not sure what I'm doing wrong.
Answered 12/15/2010 by: RonW
Green Belt

Please log in to comment
0
So I added logging to my ActiveSetup reg entry, and the log indicates that all files and folders are getting removed from C:\Program Files\Java\jre6 when self-healing occurs. But I though that by placing the user config file I want to add to each user's profile, along with a dummy registry entry, into their own feature, and making that feature the parent of the rest of the Java install, self-healing would only occur on the parent feature. That doesn't seem to be happening in this case, as seen in this snip from the log when Active Setup triggers the self-heal:

Action start 14:32:16: RemoveIniValues.
MSI (s) (7C:28) [14:32:16:224]: Doing action: RemoveShortcuts
Action ended 14:32:16: RemoveIniValues. Return value 1.
Action start 14:32:16: RemoveShortcuts.
MSI (s) (7C:28) [14:32:16:224]: Doing action: RemoveEnvironmentStrings
Action ended 14:32:16: RemoveShortcuts. Return value 1.
MSI (s) (7C:28) [14:32:16:224]: Note: 1: 2262 2: Environment 3: -2147287038
Action start 14:32:16: RemoveEnvironmentStrings.
MSI (s) (7C:28) [14:32:16:224]: Doing action: RemoveDuplicateFiles
Action ended 14:32:16: RemoveEnvironmentStrings. Return value 1.
Action start 14:32:16: RemoveDuplicateFiles.
MSI (s) (7C:28) [14:32:16:224]: Skipping action: increprogress2 (condition is false)
MSI (s) (7C:28) [14:32:16:224]: Skipping action: InstallExecute (condition is false)
MSI (s) (7C:28) [14:32:16:224]: Doing action: RemoveFiles
Action ended 14:32:16: RemoveDuplicateFiles. Return value 1.
Action start 14:32:16: RemoveFiles.
MSI (s) (7C:28) [14:32:16:396]: Counted 44 foreign folders to be removed.
MSI (s) (7C:28) [14:32:16:396]: Removing child folder of C:\Program Files\Java\jre6\lib\deploy\ (child: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\chrome\)
MSI (s) (7C:28) [14:32:16:396]: Removing child folder of C:\Program Files\Java\jre6\lib\deploy\jqs\ff\chrome\ (child: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\chrome\content\)
MSI (s) (7C:28) [14:32:16:396]: Removing foreign folder: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\chrome\content\
MSI (s) (7C:28) [14:32:16:396]: Removing foreign folder: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\chrome\
MSI (s) (7C:28) [14:32:16:396]: Removing child folder of C:\Program Files\Java\jre6\lib\deploy\ (child: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\)
MSI (s) (7C:28) [14:32:16:396]: Removing foreign folder: C:\Program Files\Java\jre6\lib\deploy\jqs\ff\
MSI (s) (7C:28) [14:32:16:396]: Removing child folder of C:\Program Files\Java\jre6\lib\deploy\ (child: C:\Program Files\Java\jre6\lib\deploy\jqs\)
MSI (s) (7C:28) [14:32:16:396]: Removing child folder of C:\Program Files\Java\jre6\lib\deploy\jqs\ (child: C:\Program Files\Java\jre6\lib\deploy\jqs\ie\)
MSI (s) (7C:28) [14:32:16:396]: Removing foreign folder: C:\Program Files\Java\jre6\lib\deploy\jqs\ie\


Just to try something different, I took the original package, which was just the Java install, then created a separate MSI whose only action was to pause for 1 second then exit. I then modified that MSI per jmcfadyen's directions in this thread, adding in my user config file and a dummy reg entry.

Using the product code from that separate MSI, I created a reg entry for Active Setup.

However, when logging in as a different user, the exact thing happens as in my first attempt: all the Java files from C:\Program Files\Java\jre6 get removed, then replaced with the files that were in the original MSI (a zipped file and a few other files), which makes Java non-functional.

I don't understand that last one at all, since by completely separating the user config install from the Java install, I don't see how Active Setup is causing a self-heal on the Java install.
Answered 12/20/2010 by: RonW
Green Belt

Please log in to comment
0
It sounds like all your features are getting repaired or self-healed, not just the Current User feature. I believe this to be the way windows installer was designed. In order for only the Current User feature to repair, it has to be the child feature, not the parent feature.

I posted a message about this exact issue back in March: http://itninja.com/question/faulttree-109237&mpage=1&key=&#
Answered 12/20/2010 by: MicrosoftBob
Blue Belt

Please log in to comment
2
Ron,

Remember that you can use a system-wide deployment.properties file too - negating the need to place the file in a user profile at all.

This post has the details.

Hope that helps,

Dunnpy
Answered 12/21/2010 by: dunnpy
Red Belt

Please log in to comment
0
Much obliged and many thanks, dunnpy. That works.

I'm going to keep researching the self-healing concept and will post back here with findings or additional questions, as I've got a few similar projects in the hopper.

I rated your posted for some massive points. Okay, two, but that's the maximum allowed by law on this website. Really appreciate the help.
Answered 12/22/2010 by: RonW
Green Belt

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