Hello wix users,

I am new to the list and have a question to ask for the experts out there. I
tried this on a few forums but haven't been making much progress.

---

In my custom action I am trying to kill a process, but
OpenProcess(PROCESS_TERMINATE,...) always fails with ERROR_ACCESS_DENIED. I
used process explorer and discovered that my custom action is running as
SYSTEM user, but is part of fewer groups and has much lower privileges (for
example, SEDEBUGPRIVILEGE is not present).

After a bit of research I found out that if I made my CA execute as
"deferred", and disabled the impersonate bit, it should be able to run with
elevated privileges. So modified my WIX file as follows:

Changed:

   <CustomAction Id="KillProcesses" BinaryKey="Callkill"
DllEntry="MyKillProcesses" Return="ignore" Execute="oncePerProcess"/>

To:

   <CustomAction Id="KillProcesses" BinaryKey="Callkill"
DllEntry="MyKillProcesses" Return="ignore" Execute="deferred"
Impersonate="no"/>


I rebuilt my entire project but still see the same lowered privileges, and
the OpenProcess() is still failing in the same way.

Is there anything else I need to do so that I have sufficient privileges to
delete the process?

Note that I do not specifically have permissions to access the desired
process I want to kill, but when I ran test code as SYSTEM (from "psexec -i
0 -s cmd.exe") the process was terminated correctly, so all I need is to run
my CA with elevated privileges.

Any help would be appreciated.

Thanks!

Jeff
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to