Joshr
Posts: 33
Joined: Mon Dec 14, 2015 5:40 pm

File not found error after using convert paths wizard

Fri Jan 22, 2021 4:03 am

Okay, it's possible I'm tired and missing something obvious, but I'm running into an issue with Path Variables and the SQL Database where immediately after converting the paths to use Path Variables with the wizard, Advanced Installer can no longer find my SQL Scripts.

I have an environment variable called InstallData. It is set to "D:\Temp\_Build". In Advanced Installer, there is a Private path variable, also called InstallData. The "Edit Path Variables" dialog confirms that Advanced Installer can see the environment variable's value:
pathvars.jpg
pathvars.jpg (62.73KiB)Viewed 2722 times
I added a new SQL Script to a custom connection with the path "D:\Temp\_Build\Temporary\Upgrade\000_to_116.before.sql". Advanced Installer shows the contents of this script with no errors.
sqlscriptpath.jpg
sqlscriptpath.jpg (17.04KiB)Viewed 2722 times
I then run the "Convert Paths" Wizard:
  • Check only "SQL Scripts"
  • Next
  • Check D:\ -> Temp -> _Build -> Temporary -> Upgrade -> 000_to_116.before.sql
  • Next
Advanced Installer shows that "D:\Temp\_Build\Temporary\Upgrade\000_to_116.before.sql" will be changed to "<InstallData>\Temporary\Upgrade\000_to_116.before.sql":
wizardpreview.jpg
wizardpreview.jpg (91.04KiB)Viewed 2722 times
After clicking Finish, Advanced installer immediately changes the SQL Script path to "<InstallData>Temporary\Upgrade\000_to_116.before.sql", clears the script contents text area, and then an error dialog with the message "File not found: "Temporary\Upgrade\000_to_116.before.sql".

After dismissing the dialog, the same error is shown three more times.

Saving the project, closing Advanced Installer, and then re-launching it displays the same error again. Checking the Path Variables dialog confirms that the path is correct.

Any ideas?

Joshr
Posts: 33
Joined: Mon Dec 14, 2015 5:40 pm

Re: File not found error after using convert paths wizard

Fri Jan 22, 2021 4:24 am

I forgot to mention I am using Advanced Installer 17.8 (F367C492)

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: File not found error after using convert paths wizard

Fri Jan 22, 2021 12:04 pm

Hello,

This is quite strange, indeed.

I have run some tests using the steps you have provided and everything worked just fine, I encountered no errors in the process.

The steps would be as it follows:
  • created the environment variable
InstallData.png
InstallData.png (20.89KiB)Viewed 2710 times
  • added the SQL script in my project
  • created the path variable
PathVariable.png
PathVariable.png (24.2KiB)Viewed 2710 times
  • used the Wizard to convert my hardcoded path to the path using the Path Variable
NewPath.png
NewPath.png (43.18KiB)Viewed 2710 times

Everything seemed to be working as expected after doing so - I did not encounter any error message.

In order for me to further investigate this, could you please forward me a sample project that reproduces this issue (either here or by e-mail at support at advancedinstaller dot com)?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Joshr
Posts: 33
Joined: Mon Dec 14, 2015 5:40 pm

Re: File not found error after using convert paths wizard

Fri Jan 22, 2021 3:29 pm

Thank you for your response Catalin.

After your response, I decided to try removing and re-adding the environment variable. I found I can make Advanced Installer fail to find the file consistently only if I check the "Private variable available only in this project" check box when adding the path variable.

If that box is unchecked, Advanced Installer has no problems finding the sql files after converting the paths. If the box is checked, the error dialog appears again after converting the paths.

Can you reproduce the issue if you check "Private variable available only in this project" when creating the path variable?

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: File not found error after using convert paths wizard

Wed Jan 27, 2021 8:06 pm

Hello,

Thank you for your followup on this.

I indeed managed to reproduce the issue on my end as well when I have set the path variable as private.

I have forwarded this to our development team for further investigation and a fix will be available in a future version of Advanced Installer.

Until then, I'm afraid that the only workaround would be to set your path variable as public.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: File not found error after using convert paths wizard

Wed Feb 24, 2021 6:34 pm

Hello,

This has been fixed in version 18.0 of Advanced Installer, released on February 22nd, 2021.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”