Problems Cancelling During Prerequesite and Regular Install
Posted: Sun Jan 01, 2006 3:51 am
I am working on changing my script to avoid all windows message boxes and do everything in dialogs. this way i keep all the language strings self contained within the setup software.
While doing this is notice some oddness...
The Story:
I am installing a new revision of the same product. The Prerequiste Installation dialog comes up saying the previous version needs to be removed. I say go for it. Right away the progressprereq dialog appears. I wonder in my head if I might lose my previous data files so I press Cancel right away. I get a confirmation box that asks me if I really want to cancel. I sit and think about this question for a minute. Everything appears frozen waiting for me so i don't worry and go get a new cup of coffee. When I return and eventually say Yes to the cancel confirmation I immediately go the next dialog that continues to install as per normal ... and the install doesn't even notice that i wanted to cancel.
So I think. Well this is okay, I guess; the computer couldn't wait for me to make up my mind. The install actually uninstalled the previous version for me after all.
I continue with the remaining portion of the install. Just after I press the final Next button to start the install I worry that I might not have put enough sugar in my coffee. I exercise my option to press Cancel. The confirmation dialog appears again, just like before, just as expected. While I am thinking about the question I notice all the file names still flying by behind the question. The installation appears to be still continuing. I ponder the implications and stir my new coffee. When i finally say Yes to the confirmation dialog I realize that the setup couldn't wait for me and the entire program is likely installed. I say this because i notice files have stopped flying by and i see only one message on the screen saying "Removing applications". I say to myself "what application am I removing?" since i am installing an application. After I say yes to the cancel confirmation dialog i go to the final setup wizard screen telling me that I have cancelled and may re-run setup in the future to install the product. So I say okay and go look around. I notice my entire application is actually installed anyway. All the files are installed as expected. I go to the control panel and see my program listed but with the wrong icon. So I click the change button for my applicaiton in the add/remove programs. I get the standard message "An error occurred while trying to remove [product]. It may have already been uninstalled. Would you like to remove [product] from the Add or Remove programs list?" So i say yes. and my program listing disappears. So I look around more and see all my files are still installed even though there is no entry in the add/remove list. I run my setup again and the whole setup runs as an uninstall. no errors occur with the uninstall and now everything is back to normal.
Note that if I don't cancel in both the prerequisite AND regular progress then the control panel funny stuff does not happen.
I just thought I would let you know this scenario. There isn't a real problem for me since the setup does correct itself when re-running it.
The real issue for me is that i don't know how to replace the confirmation message box with a custom dialog. This is because the modal messagebox confirmation appears on top of a modeless dialog. Where is the correct location in the script to show the custom confirmation dialog? Maybe this is not possible? If not possible I think I will be happy to just disable the Cancel button for my setup.
While doing this is notice some oddness...
The Story:
I am installing a new revision of the same product. The Prerequiste Installation dialog comes up saying the previous version needs to be removed. I say go for it. Right away the progressprereq dialog appears. I wonder in my head if I might lose my previous data files so I press Cancel right away. I get a confirmation box that asks me if I really want to cancel. I sit and think about this question for a minute. Everything appears frozen waiting for me so i don't worry and go get a new cup of coffee. When I return and eventually say Yes to the cancel confirmation I immediately go the next dialog that continues to install as per normal ... and the install doesn't even notice that i wanted to cancel.
So I think. Well this is okay, I guess; the computer couldn't wait for me to make up my mind. The install actually uninstalled the previous version for me after all.
I continue with the remaining portion of the install. Just after I press the final Next button to start the install I worry that I might not have put enough sugar in my coffee. I exercise my option to press Cancel. The confirmation dialog appears again, just like before, just as expected. While I am thinking about the question I notice all the file names still flying by behind the question. The installation appears to be still continuing. I ponder the implications and stir my new coffee. When i finally say Yes to the confirmation dialog I realize that the setup couldn't wait for me and the entire program is likely installed. I say this because i notice files have stopped flying by and i see only one message on the screen saying "Removing applications". I say to myself "what application am I removing?" since i am installing an application. After I say yes to the cancel confirmation dialog i go to the final setup wizard screen telling me that I have cancelled and may re-run setup in the future to install the product. So I say okay and go look around. I notice my entire application is actually installed anyway. All the files are installed as expected. I go to the control panel and see my program listed but with the wrong icon. So I click the change button for my applicaiton in the add/remove programs. I get the standard message "An error occurred while trying to remove [product]. It may have already been uninstalled. Would you like to remove [product] from the Add or Remove programs list?" So i say yes. and my program listing disappears. So I look around more and see all my files are still installed even though there is no entry in the add/remove list. I run my setup again and the whole setup runs as an uninstall. no errors occur with the uninstall and now everything is back to normal.
Note that if I don't cancel in both the prerequisite AND regular progress then the control panel funny stuff does not happen.
I just thought I would let you know this scenario. There isn't a real problem for me since the setup does correct itself when re-running it.
The real issue for me is that i don't know how to replace the confirmation message box with a custom dialog. This is because the modal messagebox confirmation appears on top of a modeless dialog. Where is the correct location in the script to show the custom confirmation dialog? Maybe this is not possible? If not possible I think I will be happy to just disable the Cancel button for my setup.