Pop $0 $ " OutFile "AppDeploy.exe" InstallDir "$PROGRAMFILES\App Deploy" ShowInstDetails show Section -SETTINGS If everything is OK, it will delete the dotnet installer and continue. In that case it will jump to the appropriate label and Abort. The IfErrors after the ExecWait will return true if the execution returned an error (usually meaning an exitcode != 0 or for example if the user aborted the dotnet installer). I needed IfErrors before the ExecWait to clear the error flag. I'll skip over the Check function (it will return 1 if it is installed). This is the bit of code I have been using for installing dotnet 2 where needed. In the example above the installers were MSI's and not exes so I have to execute the installers with msiexec /i. In theory you could capture the return value of the installer and react to it. Use ExecWait to pause your installer until the embedded installer is finished. MessageBox MB_OK "Your system does not appear to have ntbackup installed.$\n$\nPress OK to install it." File ".\Prerequisites\ntbackup.msi" ExecWait '"msiexec" /i "$INSTDIR\Prerequisites\ntbackup.msi"' IfFileExists $SYSDIR\ntbackup.exe endNtBackup beginNtBackup NET Compact Framework 2.0 Redistributable?" /SD IDYES IDNO endNetCFįile ".\Prerequisites\NETCFSetupv2.msi" ExecWait '"msiexec" /i "$INSTDIR\Prerequisites\NETCFSetupv2.msi"' MessageBox MB_YESNO "Install the Microsoft. MessageBox MB_YESNO "Install Microsoft ActiveSync?" /SD IDYES IDNO endActiveSyncįile ".\Prerequisites\ActiveSyncSetup.exe" ExecWait "$INSTDIR\Prerequisites\ActiveSyncSetup.exe" Goto endActiveSync These are the programs that are needed by ACME Suite. This demonstrates 2 techniques, prompting the user for permission and checking for the existence of a file to determine whether to install an msi. Rather than lecture theory first, let's jump right in with an example snippet. 3 Using the return value from the ExecWait.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |