Checkbox Issue

Hello All,

I have the following code that I created which will allow for the install of two software products. I can get one or the other to install with this code but if I select both it will only install the first. Are there any suggestions on how I should be setting this up? Following solving this issue it is pretty much downhill from there as this is the last hurdle before I add all of the other software products into this. I figured if-else statements would allow for the program to work as intended but I guess I am not doing it right. Thanks for all of your suggestions!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

 switch (LOWORD(wParam))
              {      /*  Identify If Adobe Pro 11 Is Checked */
                     case ID_AP11:
                          checked = IsDlgButtonChecked(hwnd, ID_AP11);             
                        if (checked) {                             
                           CheckDlgButton(hwnd, ID_AP11, BST_UNCHECKED);                   
                              } else {                       
                                  CheckDlgButton(hwnd, ID_AP11, BST_CHECKED);   
                                  }                
                           break;
                           /*  Identify If Adobe Pro 11 Is Checked  */
                           case ID_AP10:
                           	   checked = IsDlgButtonChecked(hwnd, ID_AP10);
							  if (checked) {
							  	CheckDlgButton(hwnd, ID_AP10, BST_UNCHECKED);
								  } else {
								  	  CheckDlgButton(hwnd, ID_AP10, BST_CHECKED);
								  }
								  
							break;
							  
                     }; 
              /*  If ID_AP11 Is Selected, Install  */       
              switch (LOWORD(wParam))
              {
                     case ID_INSTALL:
                          
                         checked = IsDlgButtonChecked(hwnd, ID_AP11); 
                          if (checked){
                              CheckDlgButton(hwnd, ID_AP11, BST_CHECKED);                              
                              
                                  CreateProcess(TEXT("E:\\Programs\\Adobe_11_Pro\\Install\\Adobe_Acrobat_XI\\Setup.exe"),
			                                     NULL,NULL,NULL,FALSE,
                                                 CREATE_NEW_CONSOLE,
                                                 NULL,NULL,&si,&pi);                                                
                                
                          }else{                                         
                                        /*  If ID_AP10 Is Selected Install  */                                                                    
                                      	checked = IsDlgButtonChecked(hwnd, ID_AP10);
                           				if (checked){
                           	   				CheckDlgButton(hwnd, ID_AP10, BST_CHECKED);
                           	   
                           	   	 				 CreateProcess(TEXT("E:\\Programs\\Adobe_10_Pro\\setup.exe"),
																NULL,NULL,NULL,FALSE,
																CREATE_NEW_CONSOLE,
																NULL,NULL,&si,&pi);

									  
									    }else{
									         }    									                                                        
						  
				                }
					
						break;
                               
              };
                     
            break;           
Topic archived. No new replies allowed.