Determining User Rights at run time

From: Billg_sd (Billg_sd_at_discussions.microsoft.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 09:04:44 -0700

Is there a programmatic way to determine if the user has sufficient local rights to update the registry (HKLM\SOFTWARE\MYPRODUCT) and create/modify a local file (C:\Program Files\MyProductDir)?

I've written my own custom installer. I'd like to perform these tests before installation begins, without having to determine if the user is logged in as ADMINISTRATOR.

-Billg_sd