Hi, Is there anyways to get the executable file path of a running Windows service without requiring administrator execution level privilege in .Net? (Without causing the UAC to get the user's confirmation)
A:
Try getting from Registry:
using Microsoft.Win32;
.
.
.
RegistryKey hklm = Registry.LocalMachine;
hklm = hklm.OpenSubKey(@"System\CurrentControlSet\Services\SERVICE_NAME");
string servicePath = hklm.GetValue("ImagePath");
Zanoni
2009-06-25 17:13:22
Reading form registry requires administrator execution level privileged. Doesn't it?
Mohammadreza
2009-06-25 18:05:21