If your deferred action is marked with an Impersonate value of "no" then the action is performed as SYSTEM (which doesn't actually have a real profile) which is always considered an administrator (unless the callee looks for group membership, since the computer account may not actually be in that group).
If, on the other hand, it is marked with a value of "yes" (the default), then the action is performed by impersonating the user token initiating the installation (who may not have administrative privileges, especially when UAC is turned on and the elevation prompt came from Windows Installer itself). Doesn't appcmd just modify some config file? Can you modify the config file directly instead of calling this exe? (sorry, I hardly ever do IIS so I don't know what can/should be done there). -----Original Message----- From: Andreas Herdt [mailto:andreas.he...@alaska-software.com] Sent: Friday, December 04, 2009 9:41 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Some trouble with CustomAction and appcmd.exe Hi, I am encountering a strange error when I try to invoke the appcmd tool to configure the IIS Webserver. The task is to add a handler mapping which according the IIS can be achived with following command line: appcmd set config /section:handlers /+[name='MyHandler',path='/scripts/waa1gate.dll',verb='*'] removing the handler is following command line: appcmd set config /section:handlers /-[name='MyHandler'] As suggested in one of the many posting I am using a immediate and a deferred CustomAction that are triggered by the InstallExecuteSequence in order to process those command lines. I have learned that some of the characters from above need to be escaped. For public reference this is the string I use. It took me a little while to figure this out - I assume that it is worth to share the knowledge (string is embedded in a CDATA escape): ============================= snip =========================== ![CDATA[ set config /section:handlers /[\+][\[]name=[\']MyHandler[\'],path=[\']/scrapts/waa1gate.dll[\'],verb=[\'] *[\'][\]] ]] ============================= snap =========================== When inspecting the resulting MSI package with orca, I can confirm that the info above with the escape characters are present in the Property Table. The installation runs and here is the Problem. When inspecting the installation log generated I can observe following lines: ============================= snip =========================== CAQuietExec: "C:\Windows\system32\inetsrv\APPCMD.EXE" set config /section:handlers /+[name='MyHandler',path='/scrapts/waa1gate.dll',verb='*'] CAQuietExec: ERROR ( message:Cannot find requested collection element. ) ============================= snap =========================== The 2nd line to me seems to be the result of the appcmd tool. Needless to say that the exactly same command line as observed in the first CAQuietExec line can be successfully processd from a command shell (I would not send this post otherwise ;-) For the time being I am lost. So here comes my question (finally): What makes the difference between an execution from a command prompt and an execution from the CustomAction of the Wix Toolset during installation time? Or is there anything that I have overseen up to this point? -- Andreas Herdt ---------------------------------------------------------------------------- -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users