0

I am facing an issue with some installation using the Local System Account.

I stumbled upon the following post : Is it possible to execute a custom action in WiX that is a managed .EXE file?

The first comment explains my situation accurately - "One other thing to note is that deferred actions run under the context of the system account, so if the exe requires access to a profile for any reason, this will cause it to fail. I had this very issue when trying to generate a certificate as part of my install."

The solution that was suggested was to spawn PowerShell using -RunAs switch and run a script to call the exe.

I have no knowledge of PowerShell. So I need help coming up this script.

Community
  • 1
  • 1

1 Answers1

0

If you want to run something as the local system account, the only way I know is to use psexec -s. There are some very complicated ways to do it through permanent WMI event consumers but that's way overkill.

Adam Bertram
  • 3,858
  • 4
  • 22
  • 28
  • I have tried using that. But my problem is that the exe accesses the profile while installing the certificates, which fails. Check out the link to the question I have posted in my question. Could you suggest me what to do? – Nitin Kumar Mangalam Sep 29 '15 at 18:19