Try Impersonate="no". With that attribute set to yes, that CA tries to
impersonate the user who ran the msi, because the deferred CA is already
running as admin.

On Apr 7, 2011 6:13 AM, "Stelios Kyprou" <stelios.kyp...@formicary.net>
wrote:

Hello everyone,

I am trying to deploy a SharePoint WebPart from my installer, and the way I
found to do that in WiX is to create a deferred custom action,
which:
1) Will fire up "cmd.exe"
2) Run a .bat file which:
       i) Run "stsadm.exe" (located under "C:\Program Files\Common
Files\Microsoft Shared\Web Server Extensions\14\BIN")
       ii) Execute some commands (i.e. "stsadm.exe -o displaysolution -name
"mywebPart.wsp"")

My deferred custom action definition looks like this:
<CustomAction Id="InstallWsp2010" Property="CMD" Execute="deferred"
Impersonate="yes" Return="check"
             ExeCommand="/c &quot;&quot;[#WebPartInstall]&quot;
 &quot;[STSADM2010]&quot;  &quot;$(var.WebPartName)&quot;
 &quot;[#Package]&quot;&quot;" />

As you can see, I have the custom action to run as the user that fires up
the installer, not as LocalSystem, but I get an "Access Denied" message.
I get the SAME result when I try to run that command DIRECTLY from
"cmd.exe", and the way to actually make it work, is to run cmd.exe "As
Administrator".

I still haven't found a way to do this with WiX, so my commands to not
succeed when run through the installers.
Any ideas on how I can make cmd.exe to run as administrator from wix?
Or if I can't is there another way to do this? Or do I have to write a C#
custom action in order to achieve what I'm trying to do?

Kind regards,
Stel
________________________________

This message is confidential and may be privileged. It is intended solely
for the named addressee. If you are not the intended recipient, please
inform us. Any unauthorised dissemination, distribution or copying hereof is
prohibited. Formicary Limited registered office in England and Wales,
address 1 Taillar Road, Hedon, East Yorkshire HU12 8GU, registration number
3894343, VAT number 747644304, does not guarantee that the integrity of this
communication has been maintained nor that this communication is free of
viruses, interceptions or interference.

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to