Check UAC

function CheckVistaServer2008_UAC() 
	STRING szResult;
begin
    // TODO: Perform custom initialization steps, check requirements, etc. 
    if (SYSINFO.WINNT.bWinVista) then 
	     szResult=GetRegistryValue2("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System","EnableLUA");
	     if(szResult=="1") then
	          MessageBox("Disable User Account Control in Operating System and restart computer before install Rapid EPM.Net",SEVERE);
	          abort;
	     endif;
    endif;
end;  

GetRegistryValue2 Function

prototype STRING GetRegistryValue2(STRING,STRING);
//===========================================================================
//
//  Topic:    GetRegistryValue2
//
//  Description: 
//
//  My Name    : 
//
//===========================================================================
function STRING GetRegistryValue2(szKey,szNumName)
	STRING RESULT,svNumValue;  
    NUMBER  nvType, nvSize;
begin            
    
    RESULT="";
    RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);      
    if (RegDBGetKeyValueEx (szKey, szNumName, nvType, svNumValue, nvSize) < 0) then
    else
            RESULT= svNumValue;
    endif;
    return RESULT;
    
end;

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: