Would util:RegistrySearch be helpful for you? Bo
-----Messaggio originale----- Da: Pavan Konduru [mailto:pavan.kond...@accelrys.com] Inviato: giovedì 6 marzo 2014 20.26 A: General discussion about the WiX toolset. Oggetto: Re: [WiX-users] read a regkey with special permission Nan, >From where are you getting that value from? Is it a registry value? Will be useful if you post the code you have written so far. --Pavan -----Original Message----- From: Nan Zang [mailto:naz...@microsoft.com] Sent: Thursday, March 06, 2014 10:41 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] read a regkey with special permission Pavan, Thank you for the suggestion. But my problem is a little bit complicated. The value I need for the custom action can be only fetched through a deferred custom action. I will get the value from deferred custom action. Now, I need find a way either to pass the value back to WIX; or pass it along to another custom action. Thanks Nan -----Original Message----- From: Pavan Konduru [mailto:pavan.kond...@accelrys.com] Sent: Thursday, March 06, 2014 10:25 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] read a regkey with special permission Hi Nan, Before running your custom action , run another custom action that will pass that property to your custom action(set that as immediate). Something like this: Where the "value" is the one that you want from the session, here I used INSTALLLOCATION, so put there your own property. Make sure to run the "SetProperty1" action before your c# custom action. <CustomAction Id="SetProperty1" Property="UpdateKey" Value="[INSTALLLOCATION]" Execute="immediate"/> <CustomAction Id=" UpdateKey " BinaryKey="CustomAction" DllEntry=" UpdateKey " Return="check" Execute='deferred' Impersonate='no'/> In the Installexecute sequence: <Custom Action="SetProperty1" Before=" UpdateKey "> <Custom Action=" UpdateKey " After="PublishProduct"> --Pavan -----Original Message----- From: Nan Zang [mailto:naz...@microsoft.com] Sent: Wednesday, March 05, 2014 9:58 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] read a regkey with special permission Hi, I didn't find a possible way to get the regkey value. So, I decided to use an elevated custom action to read the regkey. However, I met with another issue. >From my understanding since my customaction needs to be elevated, so it must >be executed as deferred. However, deferred custom action cannot use session >directly. How can I pass back this value to wix (or another custom action)? I >must pass it back to wix for some sql operation. My custom action is written in C# using Microsoft.Deployment.WindowsInstaller.dll Any help is appreciated. Thanks Nan -----Original Message----- From: Nan Zang [mailto:naz...@microsoft.com] Sent: Wednesday, March 5, 2014 1:33 PM To: General discussion for Windows Installer XML toolset. (wix-users@lists.sourceforge.net) Subject: [WiX-users] read a regkey with special permission Hi, I am trying to read a regkey value in the msi. But, this regkey has special ACL set on it, which only allows Local System/Administrator to read it. I am using RegistrySearch Element to read the regkey. The operation will work if the msi is launched through elevated cmd window. But, if launched normally, the operation will fail with error. "Info 1402. Could not open key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Test\. System error 5. Verify that you have sufficient access to that key, or contact your support personnel." Could you recommend any solution to get this regkey value? At this point, we prefer to avoid custom action if possible. Thanks Nan ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users