'Update service installed using windows installer without getting uac prompt
I have a app which gets installed in C:\Program Files{AppName} and a service associated with that app (NT Service{ServiceName}). This app asks for uac prompt during the installation and the service shows Elevated = "Yes" in task manager. Now, I need to update this app silently without getting uac prompt. I tried the below code which didnt work (Update didn't go through and no log file got created).
Process.Start(
new ProcessStartInfo("msiexec")
{
ArgumentList =
{
"/i",
"new_version_file_path",
"/qn",
"/L*V",
"Log_file_path",
},
UseShellExecute = true,
});
I thought that since the service is showing to be running in elevated mode update should go through. If I add my service to the local Administrators group then the installation runs fine and the app gets successfully updated. Why do I need to add it in local administrators group ? Is there another way I could update the app using c# without using any 3rd party application?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
