PDA

View Full Version : Is(USER_ADMINISTRATOR, "") in MSI problem



sgoglia
02-14-2006, 11:48 AM
Hi all!
I have a very strange problem in my installer. I made a Basic MSI project and in OnBegin I have the following code:

if (Is(USER_ADMINISTRATOR, "") = FALSE) then
MessageBox("...",SEVERE);
abort;
endif;

On Windows 2000 English the Is() method always returnes FALSE (for both normal user and admin).

I also tried:

if (SYSINFO.WINNT.bAdmin_Logged_On =! TRUE) then
MessageBox("...",SEVERE);
abort;
endif;

The result was the same. Any ideas would be more than welcome.

Thanks!

Best regards!

RobertDickau
02-14-2006, 11:58 AM
As an aside, instead of using InstallScript for this, perhaps use a launch condition that tests the AdminUser (or better yet, the Privileged) property?

sgoglia
02-14-2006, 12:01 PM
As an aside, instead of using InstallScript for this, perhaps use a launch condition that tests the AdminUser (or better yet, the Privileged) property?

I solved it already this way. But it's still strange.
Thanks anyway!