scgellion
Posts: 5
Joined: Fri Jan 16, 2009 3:16 pm

Adding a warning for missing file

I am building an installer that has an additional dialogue page prompting the user to enter a folder location. This works fine.
What I would like to do is to check that the folder the user has chosen contains a certain database file (say xyz.mdb) and show an error message if it is missing.

(I've managed to get it to show an error once the install begins which then quits out - this is a little too harsh as it means they have to start the install all over again and re-enter licence details etc)

Ideally - If it is missing I would like an error message to appear at the UI stage stopping the user from proceeding with the install process and let them go back and change the folder path to be the correct one.

Hope someone can help me out.
Thanks.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

Hello,

If you want to check if the related file (xyz.mdb) exists in the application folder (APPDIR property), then you can use our "Display an error if a specific file or subfolder does not exist in the installation path" option from "FolderDlg" dialog.

If you are not using the application folder (APPDIR property) to verify if the related file exists or not, then you can create your own custom action which will search for file to the related location and will set an installer property (i.e. MY_PROP) with 'true' value if the file exists and with "false" if it doesn't exist.
Then you can add a "Display a child dialog while a condition is true" published event, on [Next>] button, like this:
  • Name: Display a specific child dialog
    Argument: Spawn_Dialog
    Condition: MY_PROP = "false"
Please keep in mind that "Display a specific child dialog" control event must be scheduled as latest control event in the "Published Events" tab.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
scgellion
Posts: 5
Joined: Fri Jan 16, 2009 3:16 pm

Re: Adding a warning for missing file

Hi Daniel
Thanks for the quick reply.
The second option is the most appropriate.

I added a new dialogue immediately after the appdir folder dialogue which lets the user specify this extra directory (which sets SLDIR propery in this case).
Being a novice I an not sure which standard action I would need to add a custom action to that would trigger this search after they have specified this directory (and also the structure of the custom action).

Thanks
Simon
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

Hello Simon,

When you want to call a custom action from User Interface (i.e. on a button push), then you must add the custom action using the "Add custom action without sequence" operation and call the custom action through a "DoAction" control event in "Dialogs" page.

If you want to run a custom action file (i.e. on a button push), which is not added in your package installation, then you can use a "Launch attached file" custom action without sequence.

If you want to run a custom action file (i.e. on a button push), which is added in your package installation, then you can use a "Launch File or Open URL" custom action without sequence. In this case, please keep in mind that the related file must be added to your packet only as temporary.

Also, here's a list with some articles containing custom actions files:
- Serial Number Validation DLL
- Create fully fledged C# custom actions
- Write text to a file
- Remove a file or a folder during installation
- Refreshing a dialog after setting a property
- Refresh dialog box controls

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
scgellion
Posts: 5
Joined: Fri Jan 16, 2009 3:16 pm

Re: Adding a warning for missing file

Great - it's now working.
(I've also upgraded to latest version which now makes more sense too!)
Thanks for your help Daniel.
Regards
Simon
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lokesh
Posts: 23
Joined: Tue Jul 31, 2012 11:45 am

Re:Downloading pre-requisites from internet

Hi,
When i downloading my required pre-requisities software from internet, at that time my internet connection gets disconnected,I need to show an alert, Connection was disconnected,
To overcome this i enabled the Integrity check button in post-install(pre-requisites) and given the file size,after i start running the advance installer without internet now i got two alert,

Alert-1
1.Operation is timed out , after pressing OK i got an alert with,

Alert-2
2.Setup is not installed properly with yes/no option, once i click the No option, i got an wizard with installation doesn't processed correctly, install again.
if i click yes button installation gets completed,and finish wizard occurs but the required software doesn't installed in my system.

Actually i want the second alert with OK button instead of Yes/NO , after i press OK button, it show get an wizard with installation doesn't processed correctly, install again.

Eagerly waiting for your reply!!!

Thanks in Advance,
Lokesh.J
lokesh
Posts: 23
Joined: Tue Jul 31, 2012 11:45 am

Re: Warning message when internet disconnected

Hi,

While i downloading my required pre-requisities from internet, internet connection gets disconnected,i got an alert with "The Operation timed out http://downloads .......... " with OK button, now my task is that,

1.After i click OK button, finish wizard should occur with some warning description, something like "Installation doesn't completed succesfully, error occured during installation, pls install again".

2.After i click OK button,progress should stop proceeding further and wizard should close automatically.

Pls guide me. waiting for your replies.

Thanks in Advance,
Lokesh.J
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Adding a warning for missing file

Hi Lokesh,

As a side note, from what I can see your question is not related to the question posted by the user that started this thread. When you'll have other questions I recommend
you start a new thread if you cannot find another in which the same problem discussed.

Back to your request, unfortunately the pre-install prerequisites use a set of dialogs and messages which you cannot customize. The only warning/error messages are the ones that you can get if your check the integrity of the downloaded package and the install conditions for each prerequisite.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lokesh
Posts: 23
Joined: Tue Jul 31, 2012 11:45 am

Re: Adding a warning for missing file

Hi Bogdan,

Pls forgive me for interaction in this thread,
Coming back to my task,
I changed my required pre-requisites to Post-install instead of pre-install, even after that I am getting an warning message as

1."The Operation timed out http://downloads .......... " after i click OK button in that dialog, another dialog comes with Installation doesn't processed correctly, do you want to continue with yes/No option. once i click the No option, i got an wizard with installation doesn't processed correctly, install again.
if i click yes button installation gets completed,and finish wizard occurs but the required software doesn't installed in my system.("in this scenario Integrity check is enabled in my application")

2.In another scenairo, i disabled the integrity check button i got an single alert message as "The Operation timed out http://downloads .......... " after i click the OK button, finish wizard occurs.

According to your old post,
No problem even if i cant customize the error/warning message,i want to do is after clicking of OK button in operation timed out dialog box,following two things should happen,

1. Application should close silently without producing any other wizard like finish and no warning/error messages should occur, and the second one is,

2. Only finish wizard should come, without any warning/error messages.

Awaiting for your reply!!!!

Thanks in Advance,
Lokesh.J
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

Hello Lokesh,
1."The Operation timed out http://downloads .......... " after i click OK button in that dialog, another dialog comes with Installation doesn't processed correctly, do you want to continue with yes/No option. once i click the No option, i got an wizard with installation doesn't processed correctly, install again.
if i click yes button installation gets completed,and finish wizard occurs but the required software doesn't installed in my system.("in this scenario Integrity check is enabled in my application")
If you don't want to install the main product if your prerequisite package is not installed, then from "Prerequisites" -> "Properties" tab uncheck "Continue with main installation even if the prerequisite is not installed" option.
No problem even if i cant customize the error/warning message,i want to do is after clicking of OK button in operation timed out dialog box,following two things should happen,

1. Application should close silently without producing any other wizard like finish and no warning/error messages should occur, and the second one is,

2. Only finish wizard should come, without any warning/error messages.
I'm afraid this is the standard behavior and you cannot suppress the related error messages. As a workaround you can add the related prerequisite package as pre-install prerequisite, and then from "Dialogs" page set the "Bootstrapper UI -> UI Level" filed to "Basic UI and progress".

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lokesh
Posts: 23
Joined: Tue Jul 31, 2012 11:45 am

Re: Warning message when internet disconnected

Hi Daniel,
Suggestion 1:
1."The Operation timed out http://downloads .......... " after i click OK button in that dialog, another dialog comes with Installation doesn't processed correctly, do you want to continue with yes/No option. once i click the No option, i got an wizard with installation doesn't processed correctly, install again.
if i click yes button installation gets completed,and finish wizard occurs but the required software doesn't installed in my system.("in this scenario Integrity check is enabled in my application")

If you don't want to install the main product if your prerequisite package is not installed, then from "Prerequisites" -> "Properties" tab uncheck "Continue with main installation even if the prerequisite is not installed" option.


With your above suggestion, i changed to "Prerequisites" -> "Properties" tab uncheck "Continue with main installation even if the prerequisite is not installed" option.
Now i am getting
1."The Operation timed out http://downloads .......... " after i click OK button,after few sec another alert with
2."The required mandatory application doesn't installed properly" after i clicked OK in that alert finish wizards occur with some warning description



Suggestion 2:
No problem even if i cant customize the error/warning message,i want to do is after clicking of OK button in operation timed out dialog box,following two things should happen,

1. Application should close silently without producing any other wizard like finish and no warning/error messages should occur, and the second one is,

2. Only finish wizard should come, without any warning/error messages.

I'm afraid this is the standard behavior and you cannot suppress the related error messages. As a workaround you can add the related prerequisite package as pre-install prerequisite, and then from "Dialogs" page set the "Bootstrapper UI -> UI Level" filed to "Basic UI and progress".

With your above suggestion, i cant change my required application to pre-install pre-requisites, because pre-install requisites will run initially, but i want my required application to run after after EULA agreement, so its not possible for me to place the required application in pre-install..

Is there anyother ways to remove/delete/hide the warning/error messages????

Can i get simple aip to achieve this task??

Awaiting for your needful suggestions,Pls guide me,

Thanks in Advance,
Lokesh.J
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

Hello Lokesh,
With your above suggestion, i changed to "Prerequisites" -> "Properties" tab uncheck "Continue with main installation even if the prerequisite is not installed" option.
Now i am getting
1."The Operation timed out http://downloads .......... " after i click OK button,after few sec another alert with
2."The required mandatory application doesn't installed properly" after i clicked OK in that alert finish wizards occur with some warning description
I'm afraid I don't fully understand what you mean. Can you give us more details about the behavior or can you attach a sample reproducing the behavior?
Is there anyother ways to remove/delete/hide the warning/error messages????
I'm afraid there's no other solution regarding your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lokesh
Posts: 23
Joined: Tue Jul 31, 2012 11:45 am

Re: Adding a warning for missing file

Hi Daniel,
Thank you for your old post,

I understood my scenario is not possible, ok leave it.

Now i am having another doubt pls help me,
My required application is provided with condition , like Install Condition->Install prerequisites based on Conditions with->Registry value containing a version -> in search string i given my registry path i.e,HKLM\SOFTWARE\...., so based on this condition i will check whether my required application is already installed or not.

Now my requirement is that i want to give additional condition like whether my installed file path is already containing an required application.exe or not,
i tried to do like this File version->search string with requiredapplication.exe, but i doesn't seems to correct.

i tried by this way search done by a custom executable->C:\Program Files (x86)\required application\required application-1.09.09.\required application.exe but in this case just i hard code the path, so it wont works in XP, Vista it seems,because only windows 7 have Program files(X86) but in Xp and Vista Program Files only there. How can i overcome from this problem.Give me the solution for this task.

Thanks in Advance,
Waiting for your reply...

Regards,
Lokesh.J
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Adding a warning for missing file

Hello Lokesh,
Now my requirement is that i want to give additional condition like whether my installed file path is already containing an required application.exe or not,
i tried to do like this File version->search string with requiredapplication.exe, but i doesn't seems to correct.
I'm not sure why you are encountering this behavior. In order to achieve what you want you can use a "File Search" added on "Search" page. Also, you can take a look on our "Set launch conditions" article.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”