Detect WindowsInstaller3.1

//===========================================================================
//
//  Topic:    CheckWindowsInstaller3_1
//
//  Description: 
//
//  My Name    :  
//
//===========================================================================
function CheckWindowsInstaller3_1()
    string svVersionNumber,svFilePath,svFilePath2,svVersionNumber2;
    number rs,nDefChoice;
    STRING szTitle,szMsg,szMsg1,szMsg2 ;
begin
      
      svFilePath=WINDISK+"\\WINDOWS\\system32\\msiexec.exe";
      rs = VerGetFileVersion (svFilePath ,svVersionNumber);
      
      if(svVersionNumber=="") then
      
      else
          
				   if(rs ==FILE_NOT_FOUND || svVersionNumber< "3.1.0.0" ) then
				     if( LaunchAppAndWait(SUPPORTDIR^"\\WindowsInstaller-KB893803-v2-x86.exe","",LAAW_OPTION_WAIT)<0)then
				     	
				  				 MessageBox(" WindowsInstaller3.1 installation is not completed",WARNING);  
				                 InformFinishWI3_1();
				        
				      else
				      			//if (AskYesNo("Would you like to restart computer now?", YES ) = YES) then
				      			     
				      			     //SdFinishReboot ( szTitle, szMsg1, SYS_BOOTMACHINE, szMsg2, 0 );   
				      			      // System (SYS_BOOTWIN);

				      			//endif;
				      			
				      endif;
				    endif; 
				   if(CheckSencondWINDOWS()==FALSE) then
				         MessageBox(" WindowsInstaller3.1 installation is not completed",WARNING);  
				         InformFinishWI3_1();
				   else
				  endif;
				   
				  
			                   
			
	   endif;
end;
//===========================================================================
//
//  Topic:    CheckSencondWINDOWS
//
//  Description: 
//
//  My Name    :
//
//===========================================================================
function BOOL CheckSencondWINDOWS()
      
    string svVersionNumber,svFilePath,svFilePath2,svVersionNumber2;
    number rs;
    
  begin
      svFilePath=WINDISK+"\\WINDOWS\\system32\\msiexec.exe";
      rs = VerGetFileVersion (svFilePath ,svVersionNumber); 
      if(svVersionNumber<"3.1.0.0") then
            
            return FALSE;
            
      else
      		return TRUE;
      		
      endif;
  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: