     /*--------------------------------------------------------------*\

 *

 * InstallShield Example Script

 *

 * Demonstrates the DefineDialog, WaitOnDialog, EndDialog, and 

 * ReleaseDialog functions.

 *

 * This script opens a simple custom dialog box that displays

 * a bitmap.  The dialog box can be closed with any of three

 * buttons: Back, Next, or Cancel.

 *

 * The "custom" dialog box used in this script is actually the

 * InstallShield Sd dialog that is displayed by the built-in

 * function SdBitmap.  Because this dialog box is stored in

 * the file _isres.dll, which is already compressed in

 * the installation, it can be used in a script as a custom 

 * dialog box.

 *

 * In order to use this dialog box as a custom dialog box, the

 * script first defines it by calling DefineDialog.  It then

 * displays the dialog box by calling WaitOnDialog.  When an event

 * ends dialog box processing, EndDialog is called to close the

 * dialog box.  Then the dialog box is released from memory by

 * a call to ReleaseDialog.

 *

\*--------------------------------------------------------------*/


// Dialog box and control IDs.
export prototype FeatureQumranetToolsDlg();


function FeatureQumranetToolsDlg()

    STRING  MyVioserialDriverMode,MyViostorDriverMode,MySpiceDriverMode,MyAgentDriverMode,MyNetworkDriverMode,MyUSBDriverMode,MySSODriverMode,szDialogName, szDLLName, szDialog;

    NUMBER  ret,nVal,nvCommDialog,nBuffer,nDialog, nResult, nCmdValue; 
    
    STRING msg,sVal,Pass,Conf,FirstValue,MyDomain ; 
    
    BOOL    bLocal,bBack,bDone;

    HWND    hwndDlg,hInstance, hwndParent;  
    
    LIST    ListNotSupported,listID,ListDomain,ListOldVerInstalled,ListMSIDriverInstalled;




begin    

 FuncName =  "FeatureQumranetToolsDlg()";


    #define DIALOG_ID             13003 // ID Of Dialog
    
	#define RES_PBUT_NEXT         1   // ID of Next button

	#define RES_PBUT_CANCEL       9   // ID of Cancel button
	
	#define RES_PBUT_BACK        12   // ID of Back button 
	
	#define COMBO_SPICE_DRIVE   1239   //  ID of Site list combobox  -spice  
	
	#define COMBO_NETWORK_DRIVE    1240 //  ID of Site list combobo -network 
	
	#define COMBO_AGENT_DRIVE    1241   //  ID of Site list combobo -agent
	
	#define COMBO_SSO_DRIVE   1242    //  ID of Site list combobo  -sso
	
	#define COMBO_USB_DRIVE   1244    //  ID of Site list combobo  -usb
	
	#define COMBO_BALLOON_DRIVE   1247    //  ID of Site list combobo  -balloon
	
	            
	#define EDIT_SPICE_DRIVE    1234  //EditDriverStatus - spice
	
	#define EDIT_NETWORK_DRIVE    1235  //EditDriverStatus -  network
	
	#define EDIT_AGENT_DRIVE    1236  //EditDriverStatus  -agent
	
	#define EDIT_SSO_DRIVE    1237  //EditDriverStatus -sso
	
	#define EDIT_USB_DRIVE    1238  //EditDriverStatus  -  usb                                              
	 
   #define EDIT_BALLOON_DRIVE   1246  
     
   
   #define COMBO_VIOSTOR_DRIVE 		1322 
   #define EDIT_VIOSTOR_DRIVE		1323                                            
   #define COMBO_VIOSERIAL_DRIVE 	1327 
   #define EDIT_VIOSERIAL_DRIVE		1326                                            
	
	                            // 
	//ListDomain = ListCreate ( STRINGLIST ); 
	
    //bLocal = FALSE;
   // gbUseLDAP = TRUE;

    // Define the name of a dialog box to pass as first

    // parameter to DefineDialog.
                                        
    ListDomain = ListCreate ( STRINGLIST );   
    ListOldVerInstalled = ListCreate ( STRINGLIST );   
    ListMSIDriverInstalled = ListCreate ( STRINGLIST );   
    ListNotSupported = ListCreate ( STRINGLIST );                                 
    szDialogName = "FeatureQumranetTools";

    

    // DefineDialog's second parameter will be 0 because the

    // dll is in _isres.dll.

    hInstance = 0;

    

    // DefineDialog's third parameter will be null; installation

    // will search for the dialog box in _isuser.dll and _isres.dll.

    szDLLName = "";

    

    // DefineDialog's fifth parameter will be null because the

    // dialog box is identified by its ID in the fourth parameter.

    szDialog = "";

    

    // This value is reserved and must be 0.


    hwndParent = 0;

  if (MODE=SILENTMODE) then
	SdMakeName     (szDialogName , szDialogName, "", nvCommDialog); 
	SilentReadData( szDialogName, "SPICEMODE", DATA_STRING, sVal, nVal );
	MySpiceDriverMode =  sVal;
	SilentReadData( szDialogName, "AGENTMODE", DATA_STRING, sVal, nVal );
 	MyAgentDriverMode =  sVal;
 	SilentReadData( szDialogName, "NETWORKMODE",DATA_STRING, sVal, nVal );
 	MyNetworkDriverMode  =  sVal; 
    SilentReadData( szDialogName, "SSOMODE", DATA_STRING, sVal, nVal );
    MySSODriverMode =  sVal; 
    SilentReadData( szDialogName, "USBMODE", DATA_STRING, sVal, nVal );
	MyUSBDriverMode =  sVal;
	SilentReadData( szDialogName, "VIOSTORMODE", DATA_STRING, sVal, nVal );		
    MyViostorDriverMode =  sVal;
	SilentReadData( szDialogName, "VIOSERIALMODE", DATA_STRING, sVal, nVal );
	MyVioserialDriverMode =  sVal;
	
else
   
   
    // Define the dialog box. The installation's main window will own

    // the dialog box (indicated by HWND_INSTALL in parameter 7).

   /* nResult  = DefineDialog (szDialogName, hInstance, szDLLName,

                            RES_DIALOG_ID, szDialog, hwndParent,

                            HWND_INSTALL,DLG_MSG_STANDARD|DLG_CENTERED);*/

    
    
    
    nResult =  EzDefineDialog( szDialogName, "", "",  DIALOG_ID);

    // Check for an error.

    if (nResult < 0) then

        MessageBox ("An error occurred while defining the dialog box.", SEVERE);

        bDone = TRUE; 
        

        abort;

    endif;

   StartAgain:

   // Initialize the indicator used to control the while loop.

   bDone = FALSE;
   bBack = FALSE;
   ListAddString(ListOldVerInstalled,"Install",AFTER);
   //ListAddString(ListOldVerInstalled,"Update",AFTER);  
  // ListAddString(ListOldVerInstalled,"None",AFTER); 
  
   ListAddString(ListDomain,"Install",AFTER);
   ListAddString(ListDomain,"None",AFTER);  

   

   ListAddString(ListMSIDriverInstalled,"Upgrade",AFTER);  
   //ListAddString(ListMSIDriverInstalled,"UnInstall",AFTER); 
   ListAddString(ListMSIDriverInstalled,"None",AFTER); 
  
   ListAddString(ListNotSupported,"Not suported",AFTER);
   
   
   // Loop until done.

   repeat



        // Display the dialog box and return the next dialog box event.

        nCmdValue = WaitOnDialog(szDialogName);



        // Respond to the event.

        switch (nCmdValue)

            case DLG_CLOSE:

                // The user clicked the window's Close button.

                Do (EXIT);

            case DLG_ERR:

                MessageBox ("Unable to display dialog box. Setup canceled.", SEVERE);

                abort;

            case DLG_INIT:  
             
	             Sprintf(msg,"Dialog %s INIT",szDialogName);
                 WriteToLogFile(msg,0,2);
                 hwndDlg = CmdGetHwndDlg (szDialogName); 
                nBuffer = 256; 
                 ////////////////////////////////////////////////////////////////    
		         //************************Network*************************
		         ////////////////////////////////////////////////////////////////
		          
                 if !(bIntstallNetwork)then    // if need to install Network - taken from Osbehavior.ini
                     Sprintf(msg,"!bIntstallNetwork - if !(%d)then",bIntstallNetwork);
                     WriteToLogFile(msg,0,2); 
                     
                     ListGetFirstString(ListNotSupported,FirstValue); 
                     CtrlSetList (szDialogName, COMBO_NETWORK_DRIVE, ListNotSupported); 
					 CtrlSetCurSel (szDialogName, COMBO_NETWORK_DRIVE, FirstValue) ;
		             ret = _WinSubEnableControl (hwndDlg, COMBO_NETWORK_DRIVE, 0);
	                 //_WinSubEnableControl (hwndDlg, COMBO_AGENT_DRIVE, 0); 
	                 //_WinSubEnableControl (hwndDlg, COMBO_SPICE_DRIVE, 0); 
	                 //_WinSubEnableControl (hwndDlg, COMBO_USB_DRIVE, 0);  
	                 //_WinSubEnableControl (hwndDlg, COMBO_SSO_DRIVE, 0);
                 
                 else  
	                 if (gOldVerNetworkIsInstalled) then   
	                    Sprintf(msg,"gOldVerNetworkIsInstalled - if !(%d)then",gOldVerNetworkIsInstalled);
                        WriteToLogFile(msg,0,2); 
						ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_NETWORK_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_NETWORK_DRIVE, FirstValue) ;
		                CtrlSetText(szDialogName,EDIT_NETWORK_DRIVE ,"Old Version is intalled:"+ gNetworkOldVerString);
		             elseif (gbNetworkIsInstalled) then  
		                  Sprintf(msg,"gbNetworkIsInstalled - elseif !(%d)then",gbNetworkIsInstalled);
                          WriteToLogFile(msg,0,2); 
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_NETWORK_DRIVE, ListMSIDriverInstalled);
		            	  CtrlSetCurSel (szDialogName, COMBO_NETWORK_DRIVE, FirstValue )  ;
		             else  
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_NETWORK_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_NETWORK_DRIVE, FirstValue )  ;
		             endif;
		         endif; //  endif need to install Network - taken from Osbehavior.ini 
		               
		         ////////////////////////////////////////////////////////////////    
		         //*************** Agent **************************
		         ////////////////////////////////////////////////////////////////
		         
		         if !(bIntstallAgent) then
		             ListGetFirstString(ListNotSupported,FirstValue); 
		             CtrlSetList (szDialogName, COMBO_AGENT_DRIVE, ListNotSupported); 
				     CtrlSetCurSel (szDialogName, COMBO_AGENT_DRIVE, FirstValue) ;
		             ret = _WinSubEnableControl (hwndDlg, COMBO_AGENT_DRIVE, 0);
	           
		         else
		             if (gAgentOldVerIsInstalled) then
						ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_AGENT_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_AGENT_DRIVE, FirstValue) ;
		                CtrlSetText(szDialogName,EDIT_AGENT_DRIVE ,"Old Version is intalled:"+ gAgentOldVerString);
		             
		             elseif (gbAgentIsInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_AGENT_DRIVE, ListMSIDriverInstalled);
		             	CtrlSetCurSel (szDialogName, COMBO_AGENT_DRIVE, FirstValue) ;	
		             else
		             
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_AGENT_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_AGENT_DRIVE, FirstValue )  ;
		         
		             endif;   
		         endif;
		         
		         ////////////////////////////////////////////////////////////////    
		         //*************** Spice **************************
		         ////////////////////////////////////////////////////////////////
		         
		         if !(bIntstallSpice) then 
		            ListGetFirstString(ListNotSupported,FirstValue);
		            CtrlSetList (szDialogName, COMBO_SPICE_DRIVE, ListNotSupported); 
				    CtrlSetCurSel (szDialogName, COMBO_SPICE_DRIVE, FirstValue) ;
		            ret = _WinSubEnableControl (hwndDlg, COMBO_SPICE_DRIVE, 0);
	           
		         else  
		              if (gSpiceOldVerIsInstalled) then
						ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_SPICE_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_SPICE_DRIVE, FirstValue) ;
						CtrlSetText(szDialogName,EDIT_SPICE_DRIVE ,"Old Version is intalled:"+ gSpiceOldVerString);
	                  
	                  
	                  elseif (gbSpiceIsInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_SPICE_DRIVE, ListMSIDriverInstalled); 
						  CtrlSetCurSel (szDialogName, COMBO_SPICE_DRIVE, FirstValue )  ;
		             else
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_SPICE_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_SPICE_DRIVE, FirstValue )  ;
		         
		             endif;  
		                
		          endif; 
		          
		         ////////////////////////////////////////////////////////////////    
		         //*************** USB **************************
		         ////////////////////////////////////////////////////////////////
		     	              
	             if !(bIntstallUSB) then
	                ListGetFirstString(ListNotSupported,FirstValue); 
                    CtrlSetList (szDialogName, COMBO_USB_DRIVE, ListNotSupported); 
				    CtrlSetCurSel (szDialogName, COMBO_USB_DRIVE, FirstValue) ;
		            ret = _WinSubEnableControl (hwndDlg, COMBO_USB_DRIVE, 0);
	          
	             else              
		              if (gUsbOldVerIsInstalled) then
						ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_USB_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_USB_DRIVE, FirstValue) ;
						CtrlSetText(szDialogName,EDIT_USB_DRIVE ,"Old Version is intalled:"+ gUsbOldVerString);
	
		             elseif (gbUsbIsInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_USB_DRIVE, ListMSIDriverInstalled);
		             	CtrlSetCurSel (szDialogName, COMBO_USB_DRIVE, FirstValue) ;	
		             else
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_USB_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_USB_DRIVE, FirstValue )  ;
		         
		             endif; 
		         endif;
		         
		         ////////////////////////////////////////////////////////////////    
		         //*************** SSO **************************
		         ////////////////////////////////////////////////////////////////
		        
		         if !(bIntstallSSO) then 
		            ListGetFirstString(ListNotSupported,FirstValue); 
                    CtrlSetList (szDialogName, COMBO_SSO_DRIVE, ListNotSupported); 
				    CtrlSetCurSel (szDialogName, COMBO_SSO_DRIVE, FirstValue) ;
		            ret = _WinSubEnableControl (hwndDlg, COMBO_SSO_DRIVE, 0);
	          
		         else
		             if gSSOOldVerIsInstalled then
		             	ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_SSO_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_SSO_DRIVE, FirstValue) ;
						CtrlSetText(szDialogName,EDIT_SSO_DRIVE ,"Old Version is intalled:"+ gSSOOldVerString);
	
		            elseif (gbSSOIsInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_SSO_DRIVE, ListMSIDriverInstalled);
		            	CtrlSetCurSel (szDialogName, COMBO_SSO_DRIVE, FirstValue) ;
		             else
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_SSO_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_SSO_DRIVE, FirstValue )  ;
		         
		            endif; 
		             
		         endif;                  
	                              
                 ////////////////////////////////////////////////////////////////    
		         //*************** VIOSTOR **************************
		         ////////////////////////////////////////////////////////////////
		        
		         if !(bIntstallVIOSTOR) then 
		            ListGetFirstString(ListNotSupported,FirstValue); 
                    CtrlSetList (szDialogName, COMBO_VIOSTOR_DRIVE, ListNotSupported); 
				    CtrlSetCurSel (szDialogName, COMBO_VIOSTOR_DRIVE, FirstValue) ;
		            ret = _WinSubEnableControl (hwndDlg, COMBO_VIOSTOR_DRIVE, 0);
	          
		         else
		             if gViostorOldInstalled then
		             	ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_VIOSTOR_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_VIOSTOR_DRIVE, FirstValue) ;
						CtrlSetText(szDialogName,EDIT_VIOSTOR_DRIVE ,"Old Version is intalled:"+ gSSOOldVerString);
	
		            elseif (gbViostorInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_VIOSTOR_DRIVE, ListMSIDriverInstalled);
		            	CtrlSetCurSel (szDialogName, COMBO_VIOSTOR_DRIVE, FirstValue) ;
		             else
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_VIOSTOR_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_VIOSTOR_DRIVE, FirstValue )  ;
		         
		            endif; 
		             
		         endif;                  
	 
                  ////////////////////////////////////////////////////////////////    
		         //*************** VIOSERIAL **************************
		         ////////////////////////////////////////////////////////////////
		        
		         if !(bIntstallVIOSERIAL) then 
		            ListGetFirstString(ListNotSupported,FirstValue); 
                    CtrlSetList (szDialogName, COMBO_VIOSERIAL_DRIVE, ListNotSupported); 
				    CtrlSetCurSel (szDialogName, COMBO_VIOSERIAL_DRIVE, FirstValue) ;
		            ret = _WinSubEnableControl (hwndDlg, COMBO_VIOSERIAL_DRIVE, 0);
		         else
		             if gVioserialOldInstalled then
		             	ListGetFirstString(ListOldVerInstalled,FirstValue); 
						CtrlSetList (szDialogName, COMBO_VIOSERIAL_DRIVE, ListOldVerInstalled); 
						CtrlSetCurSel (szDialogName, COMBO_VIOSERIAL_DRIVE, FirstValue) ;
						CtrlSetText(szDialogName,EDIT_VIOSERIAL_DRIVE ,"Old Version is intalled:"+ gSSOOldVerString);
	            elseif (gbVioserialInstalled)then
		                  ListGetFirstString(ListMSIDriverInstalled,FirstValue); 
						  CtrlSetList (szDialogName, COMBO_VIOSERIAL_DRIVE, ListMSIDriverInstalled);
		            	CtrlSetCurSel (szDialogName, COMBO_VIOSERIAL_DRIVE, FirstValue) ;
		             else
		                ListGetFirstString(ListDomain,FirstValue); 
						CtrlSetList (szDialogName, COMBO_VIOSERIAL_DRIVE, ListDomain); 
						CtrlSetCurSel (szDialogName, COMBO_VIOSERIAL_DRIVE, FirstValue )  ;
		            endif; 
		         endif;                  
                     
            case RES_PBUT_CANCEL:

                // The user clicked the Cancel button.

                Do (EXIT);

            case RES_PBUT_NEXT: 
					CtrlGetText ( szDialogName, COMBO_SPICE_DRIVE,MySpiceDriverMode ) ; 
					CtrlGetText ( szDialogName, COMBO_NETWORK_DRIVE,MyNetworkDriverMode ) ;  	  
					CtrlGetText ( szDialogName, COMBO_AGENT_DRIVE,MyAgentDriverMode ) ;  	  
					CtrlGetText ( szDialogName, COMBO_USB_DRIVE,MyUSBDriverMode ) ;  	  
					CtrlGetText ( szDialogName, COMBO_SSO_DRIVE,MySSODriverMode ) ;  	  
					CtrlGetText ( szDialogName, COMBO_VIOSTOR_DRIVE,MyViostorDriverMode ) ;  	  
                    CtrlGetText ( szDialogName, COMBO_VIOSERIAL_DRIVE,MyVioserialDriverMode ) ; 
	            	
	             bDone = TRUE;

            case RES_PBUT_BACK:

                bDone = TRUE;
                bBack = TRUE;   
                
            case COMBO_SPICE_DRIVE: 
               CtrlGetText ( szDialogName, COMBO_SPICE_DRIVE,MySpiceDriverMode ) ;
               if (MySpiceDriverMode = "Install" ) then
               		  gSpiceInstall = TRUE ;
               	                                               
               else
                      gSpiceInstall = FALSE ;
               endif;   
               
            case COMBO_NETWORK_DRIVE:
               CtrlGetText ( szDialogName, COMBO_NETWORK_DRIVE,MyNetworkDriverMode ) ;  	  
               if (MyNetworkDriverMode = "Install" ) then
               		  gNetworkInstall = TRUE ;
               	      
                                              
               else
                      gNetworkInstall = FALSE ;
               endif; 
               
            case COMBO_AGENT_DRIVE:
               CtrlGetText ( szDialogName, COMBO_AGENT_DRIVE,MyAgentDriverMode ) ;  	  
               if (MyAgentDriverMode = "Install" ) then
               		  gAgentInstall = TRUE ;
                                                              
               else
                      gAgentInstall = FALSE ; 
               
               endif;  
               
            case COMBO_USB_DRIVE:
               CtrlGetText ( szDialogName, COMBO_USB_DRIVE,MyUSBDriverMode ) ;  	  
               if (MyUSBDriverMode = "Install" ) then
               		  gUsbInstall = TRUE ;
                                                              
               else
                      gUsbInstall = FALSE ; 
               
               endif; 
                 
            case COMBO_SSO_DRIVE:
               CtrlGetText ( szDialogName, COMBO_SSO_DRIVE,MySSODriverMode ) ;  	  
               if (MySSODriverMode = "Install" ) then
               		  gSSOInstall = TRUE ;
                                                              
               else
                      gSSOInstall = FALSE ; 
               endif; 
               
            case COMBO_VIOSTOR_DRIVE:
                 
                    CtrlGetText ( szDialogName, COMBO_VIOSTOR_DRIVE,MyViostorDriverMode ) ;  	  
               		if (MyViostorDriverMode = "Install" ) then
               		  	gViostorInstall = TRUE ;
                                                              
               		else
                        gViostorInstall = FALSE ; 
               		endif;
               		 
            case COMBO_VIOSERIAL_DRIVE:
                 
                    CtrlGetText ( szDialogName, COMBO_VIOSERIAL_DRIVE,MyVioserialDriverMode ) ;  	  
               		if (MyVioserialDriverMode = "Install" ) then
               		  	gVioserialInstall = TRUE ;
                                                              
               		else
                        gVioserialInstall = FALSE ; 
               		endif;        
        endswitch;



    until bDone;

    
    // Close the dialog box.

    EndDialog (szDialogName);
     ReleaseDialog (szDialogName); 
   
    
	    SdMakeName (szDialogName , szDialogName, "", nvCommDialog); 
	   
	sVal = MySpiceDriverMode; 	
	SilentWriteData( szDialogName, "SPICEMODE", DATA_STRING, sVal, nVal );
	sVal = MyAgentDriverMode;
	SilentWriteData( szDialogName, "AGENTMODE", DATA_STRING, sVal, nVal );
 	sVal = MyNetworkDriverMode;
 	SilentWriteData( szDialogName, "NETWORKMODE",DATA_STRING, sVal, nVal );
 	 sVal =MySSODriverMode ;
    SilentWriteData( szDialogName, "SSOMODE", DATA_STRING, sVal, nVal );
    sVal =MyUSBDriverMode;
    SilentWriteData( szDialogName, "USBMODE", DATA_STRING, sVal, nVal );
	sVal =MyViostorDriverMode; 
	SilentWriteData( szDialogName, "VIOSTORMODE", DATA_STRING, sVal, nVal );		
    sVal =MyVioserialDriverMode;
	SilentWriteData( szDialogName, "VIOSERIALMODE", DATA_STRING, sVal, nVal );	
		
		
		
		
	endif; //end of if silent mode
  
  
  
  
    // Free the dialog box from memory.   
      
        //Install SPICE
		CtrlGetText ( szDialogName, COMBO_SPICE_DRIVE,MySpiceDriverMode ) ;
		if (MySpiceDriverMode = "Install" || MySpiceDriverMode = "Upgrade") then
			       gSpiceInstall = TRUE ;
			       gSpiceUNInstall = FALSE ;
			 
		endif;
		if (MySpiceDriverMode = "UnInstall")then 
		           gSpiceInstall = FALSE ;
			       gSpiceUNInstall = TRUE ;
		endif;  
		
		//Install AGENT 
		CtrlGetText ( szDialogName, COMBO_AGENT_DRIVE,MyAgentDriverMode ) ;  	  
		if (MyAgentDriverMode = "Install" || MyAgentDriverMode = "Upgrade"  ) then
			 gAgentInstall = TRUE ;
		     gAgentUNInstall = FALSE ;    
		endif; 
		if (MyAgentDriverMode = "UnInstall")then 
			 gAgentInstall = FALSE ; 
		     gAgentUNInstall = TRUE ;
		endif;   
		//Install USB 
		CtrlGetText ( szDialogName, COMBO_USB_DRIVE,MyUSBDriverMode ) ;  	  
		if (MyUSBDriverMode = "Install" || MyUSBDriverMode = "Upgrade" ) then
			  gUsbInstall = TRUE ; 
			  gUsbUNInstall = FALSE ;
		endif;
		if (MyUSBDriverMode = "UnInstall")then 
			 gUsbInstall = FALSE ; 
		     gUsbUNInstall = TRUE ;
		endif;   
		//Install SSO  
		CtrlGetText ( szDialogName, COMBO_SSO_DRIVE,MySSODriverMode ) ;  	  
		if (MySSODriverMode = "Install" || MySSODriverMode = "Upgrade"  ) then
			gSSOInstall = TRUE ;
			gSSOUNInstall = FALSE ;
		endif;                                  
		if (MySSODriverMode = "UnInstall" ) then
			gSSOInstall = FALSE ; 
			gSSOUNInstall = TRUE ;
		endif;  
		//	Install Network	
		CtrlGetText ( szDialogName, COMBO_NETWORK_DRIVE,MyNetworkDriverMode ) ;  	  
		if (MyNetworkDriverMode = "Install" || MyNetworkDriverMode = "Upgrade" ) then
				  gNetworkInstall = TRUE ;  
				  gNetworkUNInstall = FALSE ;
		endif;       	 
		                               
		if(MyNetworkDriverMode = "UnInstall" )then 
		      gNetworkInstall = FALSE ;
		      gNetworkUNInstall = TRUE ;
		endif;	

         CtrlGetText ( szDialogName, COMBO_VIOSTOR_DRIVE,MyViostorDriverMode ) ;  	  
         if (MyViostorDriverMode = "Install" || MyViostorDriverMode = "Upgrade" ) then
				  gViostorInstall = TRUE ;  
				  gViostorUNInstall = FALSE ;
		 endif;       	 
		                               
		 if(MyViostorDriverMode = "UnInstall" )then 
		      gViostorInstall = FALSE ;
		      gViostorUNInstall = TRUE ;
		 endif;     


if (bBack) then
       return BACK;
       
    endif;
                
   return 0;             
end;
