WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jat6923 on September 06, 2013, 08:17:57 AM

Title: Find Credentials of Who is Executing Program
Post by: jat6923 on September 06, 2013, 08:17:57 AM
is there a way to determine the credentials of the account running the winbatch program.   Use Landesk to push patches/software/fixs.  Normally software executed via landesk push runs with SYSTEM account credentials even when there is another user logged in on workstation.  Have a registry update program that I need to verify is running with SYSTEM or an admin account credentials on Win7 64bit.
Title: Re: Find Credentials of Who is Executing Program
Post by: Deana on September 06, 2013, 11:40:40 AM
Take a look at the wntGetUser function in the Network Extender. wntUserProps also can be used to get the logged in users Privilege level ("GUEST", "USER", or "ADMIN")

You can also add code that attempts the registry update, if it fails then you can assume the account doesn't have the necessary credentials.