|
|
#1 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
ExecWait issue
Im new to NSIS and following is my issue.
Im having two different path directory for client and server so im using custom variables to save the path instead of $INSTDIR. while installation im checking whether any previous version exists and if exists im calling uninstaller to uninstall using ExecWait as follows. ExecWait '$G4 _?=$INSTDIR' Steps : ------- 1.exe executed. 2.prev version found. 3.uninstaller is triggered. 4.installer is disabled and uninstaller is active. 5.i shifted my focus to installer and clicked "NEXT" . Result : NO change in the installer since it is disabled. 6.i proceeded with uninstallation. 7.After Uninstallation , Installer becomes active. 8.I found installer has skipped one page since i clicked "NEXT" when it was disabled. why does the page is being skipped? How to avoid it?? I tried searching for this issue in forum but couldnt find. if the issue is addressed already let me know the link. else please help me to find a solution. Thanks in advance. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
Thanks for the response. im not able to understand which example your are talking about. could u give me the sample code to disable the next button. thanks once again.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Sep 2010
Posts: 5
|
Click his "disable" and you can read what you need.
GetDlgItem $0 $HWNDPARENT 1 <---- 1-next EnableWindow $0 0 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
thanks Yathosho and Vankaa for the respose.
The code disabled NEXT button. but still if i click on it, after uninstallation once it enters back to the installation i find it skips pages according to total number of clicks on NEXT (disabled) button. some one do me a favour. using MUI create a sample nsi in which u call another installer and try clicking on the NEXT button when the installer is not in active mode and let me know whether u too face the same issue. Thanks in advance |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Please submit a bug report. For now, try using a Banner (see NSIS\Docs). You could also try putting some Sleep statements after as well.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Aug 2010
Posts: 104
|
I don't think that it is a bug. I guess it has more to do with the fact that the mouse clicks are being "queued" during the ExecWait. And as the button is re-enabled afterwards the previous clicks are now being processed.
Quote:
I am doing quite the same (uninstall previous version during install) as you do. IMO you have a fault in your concept. Calling the uninstaller directly from one of the installer pages is generally a bad idea. What if the user cancel the installation afterwards? I added a separate topmost hidden section from where I call the uninstaller (if needed). You can control this e.g. by using PHP Code:
Good luck & success Gunther |
|
|
|
|
|
|
#8 | |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Quote:
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Aug 2010
Posts: 104
|
Quote:
If you want to change it you have to "manipulate" the mouse handling of Windows. But as I suggested, IMHO there is no need for this. Gunther |
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
This is not default Windows behaviour. I'm not sure how you got that idea. It will occur if you block the message thread for a window. In NSIS's case it still processes WM_PAINT but does not process anything else. It could be modified to process other window messages (thus eat them up) but not take any action.
Edit: However I definitely agree that use of ExecWait outside a section for long processes (and especially uninstallers) is definitely not a good idea. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
Thanks Afro and Netsurfer for your suggestion. Thanks once again Afro for your active participation in the forum and for immediate response on the issues.
1. Just to confirm it is a BUG i asked others to check whether they too face the same issue Do you face the same issue?? If yes , tell me the right procedure to report a BUG. 2. As discussed above that usage of ExecWait outside long processes is not good idea. I'll make a note of it. I have a situation where user need to uninstall the previous version before proceeding. I'll try to edit the current scenario. |
|
|
|
|
|
#12 | |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
Netsurfer i'll try to make utilize of the concept and the code given by you.Thanks.
Quote:
|
|
|
|
|
|
|
#13 | ||
|
Senior Member
Join Date: Aug 2010
Posts: 104
|
Stu,
Quote:
But I am pretty shure that you have a much deeper knowledge of these things than I have - so if you it is a bug then it is bug. Quote:
At another place in my installer I solved this issue (don't want the user to click around) by hiding the whole installer window and only showing a banner during the process. Maybe this works for you, too? Gunther |
||
|
|
|
|
|
#14 | |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
Quote:
In uninstaller section i have a message box which will ask for the confirmation. so only after confirmation it ll proceed to uninstall. After that i check my registry PHP Code:
I know there must be some better way to call the page again like PHP Code:
|
|
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
I have two radio button on the page
1.Add/Reinstall ( which will uninstall and proceed with installation ) 2.Uninstall ( does only uninstallation ) |
|
|
|
|
|
#16 |
|
Junior Member
Join Date: Oct 2010
Location: INDIA
Posts: 37
|
Bug raised .Artifact ID: 3087924
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|