Problem with file path - Advanced Installer Community
FSC
Posts: 7
Joined: Thu Feb 23, 2017 9:27 am

Problem with file path

Hi Advanced Installer team,

I have problem with Advanced Installer path to database file. I use sqlite database. When I want to upgrade database by SQL script, the installation say the file not found. But when i look into my APPFOLDER the database file is there. This problem aperas only when i use path like this ([APPDIR]\Database.sqlite) or when i choose database file directly. When I use absolute path to file (C:\Program Files\Your Company\Your Application\Database.sqlite) the script will update database without problem. I also made property for this but result is same: file not found. Is this could be bug?
Attachments
Absolute path to database file
Absolute path to database file
absolut.png (148.41 KiB) Viewed 4068 times
Path with Advanced Installer
Path with Advanced Installer
relativ.png (184.65 KiB) Viewed 4068 times
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Problem with file path

Hello,

This could happen because the Query action is executed before the APPDIR is resolved in InstallUISequence. Please try to move the "SqlQueryAction" custom action after "Paths resolution" in Wizzard Dialogs stage. This will modify the InstallUISequence order.
Please tell us if the problem still persits.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FSC
Posts: 7
Joined: Thu Feb 23, 2017 9:27 am

Re: Problem with file path

Thanks a lot for reply. Program now can find path to the database.
Unfortunately I have another problem. When application is executing SQL scripts show dialog "File not found". Installation probably can not find database file again.
Attachments
1.png
1.png (33 KiB) Viewed 4024 times
script.png
script.png (21.52 KiB) Viewed 4024 times
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Problem with file path

Hello,

Could you please send us the .AIP (project) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FSC
Posts: 7
Joined: Thu Feb 23, 2017 9:27 am

Re: Problem with file path

Hi AI team and really thanks for reply.
Database file was mark as not overwrite and AI can't found the file during installation.

I can't figure out how to resolve this problem:

1, Connect to SQLite database and get DbVersion as propperty [EDIT_2_PROP].
2, Use SQL script based on DbVersion (propperty)
3, Keep existing data in database after update by SQL script

Biggest problem is step 3. I dont know how to keep existing data in database. Could you help me with this issue?
Here is my database file and .aip file. What am I doing wrong?

Best regards
V.S.
Attachments
Database.zip
(6.57 KiB) Downloaded 232 times
SQLite.aip
(31.84 KiB) Downloaded 264 times
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Problem with file path

Hello,
Biggest problem is step 3. I don't know how to keep existing data in database. Could you help me with this issue?
Here is my database file and .aip file. What am I doing wrong?
I'm afraid I don't fully understand your scenario. Are the changes made by your script overwitten at install time? Could you please give us a detailed scenario of what you want to achieve and what is the actual behaviour?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”