What I'm looking to do is to be able to launch a child process (with elevated privileges) from my VSTO COMAddin that can access the COMAddin
object for the process that spawned it.
More specifically, I want to be able to kill the addin (via COMAddin.Connect = false
), do the work that requires the privileges and then restart the addin.
Using a second addin I can accomplish this, as I have access to the Application.COMAddIns
collection (second addin would shutdown the first when required, start the privileged process and restart the first addin when it completes). I'd rather not have 2 separate addins to accomplish this though if at all possible.
I also know that I can start a new instance of Excel with new Excel.Application()
and access the COMAddIns
from there, however I don't want a new instance, I want to be able to control the addin from the running instance.
Any help/ideas are appreciated.