Terminate Install Under SYSTEM Account
Posted: Fri Oct 21, 2016 8:22 am
Hello,
Is there any method from inside InstallAware that I can test if my install is running under the SYSTEM account? I need to terminate one of my installs when run in this environment.
I know about the Get System Setting Logged on User Name - the problem is that the SYSTEM name is locale specific. On an English O/S it is SYSTEM, and on a French system it is SYSTÈME. Is there a way to ask "Are you SYSTEM"? Or get the Well-Known SID (S-1-5-18)?
Right now my only approach is to write a C# console exe that queries that information for me using System.Security.Principal.WindowsIdentity.GetCurrent().IsSystem and to include that in my Support files and call it from inside IA.
Is there is a simpler way to do this from inside IA?
Thanks,
Sheri
Is there any method from inside InstallAware that I can test if my install is running under the SYSTEM account? I need to terminate one of my installs when run in this environment.
I know about the Get System Setting Logged on User Name - the problem is that the SYSTEM name is locale specific. On an English O/S it is SYSTEM, and on a French system it is SYSTÈME. Is there a way to ask "Are you SYSTEM"? Or get the Well-Known SID (S-1-5-18)?
Right now my only approach is to write a C# console exe that queries that information for me using System.Security.Principal.WindowsIdentity.GetCurrent().IsSystem and to include that in my Support files and call it from inside IA.
Is there is a simpler way to do this from inside IA?
Thanks,
Sheri