Hi Mukesh, If the installing user has an administrative rights there would be no problem. Impersonate='No' will use system context btw.
Mukesh Agrawal wrote: > > Thanks for the reply Wilson. > Yes, it is necessary. > However, I got over the issue by setting Impersonate='Yes'. But, I fear, > any other user trying to install the product would not be able to do so. > > -----Original Message----- > From: Wilson, Phil [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 11:17 PM > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] A Problem with CustomAction > > I suspect that WMI is unreliable in custom actions. WMI uses COM > underneath, sometimes COM and local RPC (IIRC). You can't impersonate > more than once - if you are already impersonating someone you can't then > impersonate again on top of that. When you're already impersonating in a > custom action then you can't impersonate again for a WMI call. If you add > the .NET framework to this you've got a really complex calling sequence > that is completely different when compared to running from the command > line. > > Is WMI really necessary to do what you're doing? > > Phil Wilson > > -----Original Message----- > From: Mukesh Agrawal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 4:01 AM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] A Problem with CustomAction > > Caller of System.ManagementObject.Put() should be fully trusted. Not > accessible by partially trusted code. What should be the values of > "Execute" and "Impersonate" for this ? > Please reply. > > -----Original Message----- > From: Mukesh Agrawal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2008 4:55 PM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] A Problem with CustomAction > > I would like to add one more thing, custom action is running absolutely > fine from command line. > > From: Mukesh Agrawal > Sent: Tuesday, December 02, 2008 4:46 PM > To: General discussion for Windows Installer XML toolset. > Subject: A Problem with CustomAction > > > Hi > > I have a custom action that uses WMI (System.management classes) and > creates a management object. Everything is running fine until > System.ManagementObject.Put() method for committing the changes to the > management object is called. Even this is running fine when I debug > through the code from VS. But, when I invoke this custom action from my > installer written in wix v2, It throws an error : access denied. I am > running installer from administrator mode. 'Impersonation' is set to "no". > > Here is the wix code. > <CustomAction > Id="CustomActionBinaryInstallSapBts" > > FileKey="Microsoft.Adapters.Setup.CustomActionMachineDOTConfig" > ExeCommand='-ib sap [UILevel] $(env.PUBLIC_KEY)' > > Execute="deferred" > Impersonate='no'/> > > Please help. > > Thanks > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- View this message in context: http://n2.nabble.com/A-Problem-with-CustomAction-tp1603279p1608231.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users