|
|
#1 |
|
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
Run application compulsorily after install
In my setup i have finish page done by using !insertmacro MUI_PAGE_FINISH . I have also used !define MUI_FINISHPAGE_RUN "$INSTDIR\setup.exe" which run the application if the user selects the checkbox in finish page. I think it is the default behaviour of finish page. But i want the application to run compulsorily after install if a certain command line is passed.otherwise it should work normal as before. So how it can be done?
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
!define MUI_PAGE_CUSTOMFUNCTION_SHOW FinishPage_Show
!insertmacro MUI_PAGE_FINISH Function FinishPage_Show StrCmp $Something "Something" 0 +2 ShowWindow $mui.FinishPage.Run ${SW_HIDE} FunctionEnd If you use MUI_FINISHPAGE_RUN_NOTCHECKED, you also need: SendMessage $mui.FinishPage.Run ${BM_SETCHECK} ${BST_CHECKED} "" PostEnd: |
|
|
|
|
|
#3 | |
|
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
Quote:
I need the checkbox to be ticked and user cannot change it if a particular command line was passed. |
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
If it didn't work, it probably means you are using MUI1 (MUI.nsh). In that case, there's no $mui.FinishPage.Run (a MUI2 var), you need to get the checkbox hwnd yourself:
ReadINIStr $0 "$PLUGINSDIR\ioSpecial.ini" "Field 4" "HWND" The rest is the same. If you don't want the checkbox hidden, just disabled, use: EnableWindow $0 0 PostEnd: |
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
i can use ShowWindow and hidden that checkbox? Does it cause any problem?
Also what is Field 4 in ioSpecial.ini? i checked my ini and there was no Fielid 4 . But your solution works perfectly. |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
It doesn't cause any problems.
PostEnd: |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
MUI1 uses InstallOptions for the Welcome/Finish page and ioSpecial.ini is where the page elements are defined. You couldn't see Field 4 (the Run checkbox) probably because you were looking too early; take a look once the Finish page is displayed.
PostEnd: |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Nov 2005
Posts: 115
|
What about using '.onInstSuccess'? Put your command there.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|