What else have you got in the way of searches? If this is your only AppSearch then just have it in the Execute sequence. I've not tried this, but AppSearch in the execute sequence should be elevated and may be able to read that registry item. --------------- Phil Wilson
On Thu, Mar 6, 2014 at 10:24 AM, Pavan Konduru <pavan.kond...@accelrys.com> wrote: > 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