I have built a WIX project with custom WPF UI that must run with elevated privileges. After an install/update I want to start my application but I do not want the application to be started with Elevated privileges.
Currently I am doing the following
In "Protected Overrides Sub Run()" I do the following
Dim m_LowProcess As Process = Process.GetCurrentProcess
Then once the installer is finished I run the following code
Dim procStartInfo As New ProcessStartInfo
With procStartInfo
.FileName = fInfo.FullName
.WindowStyle = ProcessWindowStyle.Normal
End With
m_LowProcess.StartInfo = procStartInfo
m_LowProcess.Start()
I have checked the process ID and Handle properties and they are identical. But my program still runs with a different privilege after an install.
What am I doing wrong or is this never going to work?
I am aware of this forum question which solves the problem other ways.