Unable to add registry Installer Classes entries - Citrix XenApp Hosted Client
#1
Posted 06 April 2010 - 08:56 PM
Does anyone know of a script or function in the LiveXP project that would be clearing out those registry areas towards the end of the process?
I'm attaching the Citrix script I've created in case I've just done something wrong in there.
4/7/10 - Updated script.
4/23/10 - Uploaded v6 to private site. This version is fully working though still has an issue with two registry entries. Citrix_XenApp_Hosted_Client.script
#2
Posted 06 April 2010 - 09:38 PM
The only way to work around this is, to use a reg file with your settings and import it after those dll have been registered.
#3
Posted 06 April 2010 - 11:05 PM
Some entries may possibly need to be added at boot-time. For this you can use the RegAddBoot command instead of reg_add.
Regards,
Galapo.
#4
Posted 07 April 2010 - 12:15 PM
I'll give the RegAddBoot command a try, but do you know if there is a list of registry sections that might get nuked by the build process and thus need to be added at boot? I hate to just start converting all my registry entries to that if I don't need to, and some things I'm working on like this have 1000's of entries that I'd rather not try to search for each one to make sure it got built in correctly.
Thanks.
-Raetha
The script needs some tidying to remove hard-coded paths, possibly the issue could lie there too.
Some entries may possibly need to be added at boot-time. For this you can use the RegAddBoot command instead of reg_add.
Regards,
Galapo.
#5
Posted 07 April 2010 - 12:24 PM
- Export everything to reg files.
- Run a full build.
- After bootup export the whole registry, or at least all hives that your sript writes to.
- save the files
- compare the exported reg files from the booted system with the ones which were create from just your script. (You can use Advanced Registry Tracer for that.)
E viola you have a list of all keys that have been deleted or overwritten.
#6
Posted 07 April 2010 - 01:29 PM
- Run your script stand alone. (First create the needed directories in %target%)
- Export everything to reg files.
- Run a full build.
- After bootup export the whole registry, or at least all hives that your sript writes to.
- save the files
- compare the exported reg files from the booted system with the ones which were create from just your script. (You can use Advanced Registry Tracer for that.)
E viola you have a list of all keys that have been deleted or overwritten.
#7
Posted 07 April 2010 - 05:20 PM
- Run your script stand alone. (First create the needed directories in %target%)
- Export everything to reg files.
- Run a full build.
- After bootup export the whole registry, or at least all hives that your sript writes to.
- save the files
- compare the exported reg files from the booted system with the ones which were create from just your script. (You can use Advanced Registry Tracer for that.)
E viola you have a list of all keys that have been deleted or overwritten.
#8
Posted 07 April 2010 - 05:31 PM
I also converted all the known trouble entries to RegAddBoot, and some of them are working fine. However the Software\Classes\Installer\Assemblies\X:|Program Files|Citrix|ICA Client|XPSPrintHelper.exe entry and all of the Software\Microsoft\Windows\CurrentVersion\Installer entries are still missing. Any ideas on what else might be impacting this? Or what else I should look at? The build does use PENetwork, HWPNP and Windows Installer in case any of those might be doing something after boot to cause issues.
Updated script attached to original entry.
The script needs some tidying to remove hard-coded paths, possibly the issue could lie there too.
Some entries may possibly need to be added at boot-time. For this you can use the RegAddBoot command instead of reg_add.
Regards,
Galapo.
#9
Posted 07 April 2010 - 06:25 PM
Simply create first the full project and do what i've told you, then go to the target folder and delete all files but leave all directories.I took a look at trying to do this, and realized I have no idea how. I setup an empty target,
Then run just your script and do what i've already told you.
#10
Posted 08 April 2010 - 02:07 AM
Hmmm, you've got some issues here!I also converted all the known trouble entries to RegAddBoot, and some of them are working fine. However the Software\Classes\Installer\Assemblies\X:|Program Files|Citrix|ICA Client|XPSPrintHelper.exe entry and all of the Software\Microsoft\Windows\CurrentVersion\Installer entries are still missing.
Regarding the second registry entries, I do not know why they aren't being written, or maybe they are being deleted by something?
Regarding the first registry entry, it is a reg_multi_sz entry, which is currently unsupported by the PE1x API function. I've now coded support for this and will upload the necessary updates a bit later on.
This means that now 0x1, 0x2, and 0x7 entries are supported, the rest aren't. Which means RegAddBoot won't accomplish what you want. You'll need to import a REG file of some kind as MedEvil has suggested.
In your script, for the 0x1 registry entries which contain %PE_Programs% etc., you need to change these to 0x2 entries. Entries with 'X:\i386' need to be changed to 0x2 and the 'X:\i386' string replaced with '%SystemRoot%'.
Comment out this line: 'reg_add,0x2,"%reg%\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Templates","%systemdrive%\Documents and Settings\All Users\Templates"'.
Hope this helps.
Regards,
Galapo.
#11
Posted 08 April 2010 - 02:42 AM
I'll issue the updates to the LiveXP server once I've synchonised my local project files with Lancelot's updates there.
Regards,
Galapo.
#12
Posted 08 April 2010 - 03:02 PM
First what do the different reg entry types actually mean, I've just been using the ConvRegToInf utility and have no idea what the types actually line up to, but figured that program was taking care of things correctly.
Second, since I start with a reg export it's no problem to import that, but is there some build in call or program to support that? Or would I need to do something like add a Startup folder entry to run the reg file?
Thanks to both you and MedEvil for the help, it's gotten me a lot farther than I was getting on my own.
-R
Hmmm, you've got some issues here!
Regarding the second registry entries, I do not know why they aren't being written, or maybe they are being deleted by something?
Regarding the first registry entry, it is a reg_multi_sz entry, which is currently unsupported by the PE1x API function. I've now coded support for this and will upload the necessary updates a bit later on.
This means that now 0x1, 0x2, and 0x7 entries are supported, the rest aren't. Which means RegAddBoot won't accomplish what you want. You'll need to import a REG file of some kind as MedEvil has suggested.
In your script, for the 0x1 registry entries which contain %PE_Programs% etc., you need to change these to 0x2 entries. Entries with 'X:\i386' need to be changed to 0x2 and the 'X:\i386' string replaced with '%SystemRoot%'.
Comment out this line: 'reg_add,0x2,"%reg%\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Templates","%systemdrive%\Documents and Settings\All Users\Templates"'.
Hope this helps.
Regards,
Galapo.
#14
Posted 08 April 2010 - 05:08 PM
D:\>reg2WBSprg.exe -f:citrix.reg -o:citrix.script -H -E -A -R -0 -W -B
Exception EAccessViolation in module reg2WBSprg.exe at 00002BA9.
Access violation at address 00402BA9 in module 'reg2WBSprg.exe'. Read of address 00A0FFFC.
I'm guessing some of those funky registry keys are killing it.
However, as you both have mentioned I'm not sure that the conversion matters since the keys appear to be getting killed off. I've had good luck with the RegAddBoot calls with the exception of the Software\Microsoft\Windows\CurrentVersion\Installer tree. However ExpEnvVar seems to be doing the correct things, as if I run it once the image has fully booted it does create the missing registry entries. So something in the boot process that happens after EEV runs is killing the entries. I've looked through the original RunOnceEx entries and tried reapplying them and nothing seems to kill the entries once they have been recreated. So I'm a tad lost.
I'm going to try importing the registry entries as a whole post boot and see if they still get killed.
#15
Posted 08 April 2010 - 09:13 PM
#16
Posted 08 April 2010 - 09:57 PM
Also in your script you'll need to change the first RegAddBoot line to these two lines:
StrFormat,REPLACE,%PE_Programs%,\,|,%New_Prog% RegAddBoot,HKLM,0x7,"Software\Classes\Installer\Assemblies\%New_Prog%|Citrix|ICA Client|XPSPrintHelper.exe","XPSPrintHelper#$cVersion=#$q1.0.0.0#$q#$cRuntimeVersion=#$qv2.0.50727#$q#$cPublicKeyToken=#$q51be294c288ebe0d#$q#$cGUID=#$q0dadf4ef-8288-459d-9fa0-1f1f1f89090a#$q#$cCulture=#$qneutral#$q#$cprocessorArchitecture=#$qX86#$q","aSm26G2Uf=Suvg2jvffOICA_Client>`$I*%Z'Gl8Kv5j1^BVPT"
Regards,
Galapo.
#17
Posted 09 April 2010 - 12:50 PM
My guess without truly understanding the Windows Installer stack is that it must initialize those keys when first registered, thus removing anything already there. I suspect this problem is within the MS code and not something that could be easily fixed but simply needs to be worked around.
So my question back to you, Galapo, is does it make sense for you to change the API and have ExpEnvVar run later in the process, like in the 999 slot? That would allow anyone doing post boot registry entries to use the RegAddBoot function without having to also or instead create their own RunOnceEx entry with partial or full registry values to be imported later.
If you don't like the idea of changing when ExpEnvVar runs, what do you think my best bet is, import all the registry keys at boot time? Or just import the installer ones, and have the rest use normal API commands to get added at build time?
I'm still hoping when done that I can contribute this script back to the comunity in case anyone else works in a Citrix environment, so I want things to make as much sense as possible.
Thanks for all the help.
-Raetha
#18
Posted 13 April 2010 - 08:58 PM
Any response to my last question about possibly moving ExpEnvVar.exe to run later in the process than the Windows installer?
Thanks,
-Raetha
#19
Posted 14 April 2010 - 05:23 AM
Sorry about that. I've been tied up the last couple of days as my router died and I had trouble setting up the new one (not solved until I happened to discover a beta firmware hidden on the internet somewhere and flashed the new router).
I'm a little bit wary of setting it higher as some 550 entries possibly may depend on ExpEnvVar.exe having run at 500 level.
So what I've done is alter the MSI installer script to have the msi.dll registration performed at 450. Download the new script from the LiveXP server and see if it works for you.
Regards,
Galapo.
#20
Posted 14 April 2010 - 05:27 AM
See if the new script works without altering these. Post back with the result.
Thanks,
Galapo.
#21
Posted 14 April 2010 - 02:26 PM
Just gave it a try with using RegAddBoot rather than my own reg import. Seeing the same thing with the Software/Microsoft/Windows/CurrentVersion/Installer registry tree being empty. So I would confirm that it's those 900 series installer entries giving me grief. Could those be moved further up the process?
Again, if it's too much pain, I'm ok with using the reg file solution, I'm just thinking there's gotta be another person out there banging their head against a similar problem.
Thanks,
Raetha
#22
Posted 15 April 2010 - 12:36 AM
Regards,
Galapo.
#23
Posted 15 April 2010 - 07:56 PM
#24
Posted 15 April 2010 - 08:45 PM
#25
Posted 15 April 2010 - 10:51 PM
So the installer had been working but isn't now. Is that still the case?The Citrix installer had been working, as that was how I had been testing. So not sure if you might have accidentally hit something else in the Windows Installer script, but if not maybe we need to revert those changes and I'll just use a reg file for the pieces that aren't working.
Nothing else was adjusted in the script apart from altering the three RunOnceEx entries. The MSI files I tried to install in my test all worked fine (well, apart from one which failed since .NET wasn't installed).
Thanks,
Galapo.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users