sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Temp File is not getting updated.

Hi,

I have a strange issue which I am encountering with a Temp File in one of my aip project.

Issue: Values in Temp File is not getting updated.

I have added a Temp File (TXT File) using Add Temporary Files section in one of my Advanced Installer Project and making use of it one of my custom actions which gets executed at the time of applying the patch. These values will get changed when ever we try to build a new patch. Here the issue what I am encountering is values are not getting updated, it always shows me the old values.

Let's say I create a Temporary File for the first time in name of BackupList.txt with the following contents DLL1.dll, DLL2.dll, DLL3.dll to the project and create Hotfix 1, I am able to get correct values in my Custom Action at the time of applying patch. And while creating Hotfix 2, if I try updating the contents of BackupList.txt to DLL4.dll, DLL3.dll I am still seeing the values as DLL1.dll, DLL2.dll, DLL3.dll itself in the Custom Action.

I have gone to the temp location in which the temp file gets created, and found that system is trying to create a file which had old values(DLL1.dll, DLL2.dll, DLL3.dll) all the time.

So, as a workaround what I have tried is to remove the BackupList.txt from the Temp Folder location and added a new file in name of UpdatedBackupList.txt from which I am able to read the correct values. Here the other issue what I have observed is it started creating two Temp Files into Temp Location Folder one is BackupList.txt and UpdatedBackupList.txt at the time of applying 2nd patch.

Note: BackupList.txt was deleted while generating the 2nd Patch.

Could you please let me know whether it is default behavior of advanced installer or else I am doing something wrong?

Please find the attached sample for reference:

Issue which I had encountered with workaround approach:

Upon installing the hotfix it tries to copy two files (UpdatedFileList.txt, UpdatedList.txt) instead of one(UpdatedList.txt) into Temp folder.

Actual Issue:

UpdatedFileList.txt which gets updated by us upon building each and every patch is not getting reflecting, instead it always shows the old information.

Note: I am using Advanced Installer 17.7 Version and even I have tried with Version 18.00 which got release few days back. It's still the same.


Regards,

Sandeep.
Attachments
Temp File POC.aip
(16.24 KiB) Downloaded 189 times
Temp File Hotfix.aip
(2.08 KiB) Downloaded 190 times
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: Temp File is not getting updated.

Hi,

Advanced Installer Support, Could you please look into the problem which we are encountering and help us to solve the issue?
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Temp File is not getting updated.

Hello Sandeep,

First of all, please accept my apologies for the delayed reply.

Regarding your issue, please note that by default, a temporary file will be removed at the end of the installation.
Unlike Advanced Installer's regular files or resources, "Temporary Files" are copied on the target machine at the beginning of the installation and are deleted at the end of it, ensuring you have access to them throughout the entire install process.
To avoid this, please check the "Do not remove the file when setup ends" option:
DoNotRemove.png
DoNotRemove.png (13.29 KiB) Viewed 4494 times
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: Temp File is not getting updated.

Hello Catalin,

Thanks for your reply.

My issue is not the file getting deleted.

Issue is with the values not getting updated properly in Temp File.

Let's say:

1 I have created an installer by adding a Temp file with the following contents:
apple
ball
2. Installed it into one of my machines.
3. Updated the Temp File created in Step 1 by replacing apple, ball with cat and dog.
4. Built the Installer.
5. Created a Patch from the installer which was built in step 4.
6. At the time of applying the patch.. Temp file which gets created in Temporary Folder is still showing me Apple, ball instead of cat and dog.

I hope you understood my problem.
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Temp File is not getting updated.

Hello Sandeep,

Thank you for your explanation.

I believe the scenario is clear now.

I have run a test on my end by following the last provided steps and everything seemed to be working as intended - the created file in the %temp% directory shows the updated content.

If possible, could you please create a sample that reproduces this and forward it to me (would be useful if you could also forward me the two MSIs you are using to create the patch)? Basically, here would be the resources:

- the .AIP used to build the first MSI + the MSI

- the .AIP used to build the second MSI + the MSI

- the patch project + the MSP file

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: Temp File is not getting updated.

Hi Catain,

You can download the files from the URL below:

https://we.tl/t-3XCEet42Uz

Note: I can't add those files as an attachment to this post as the size of the file is large.

Upon installing 1st MSI It should install the following files with the version as specified in brackets:

Xpedeon.Attendance.BLL.dll (3.1.0.0)
Xpedeon.Attendance.DALFactory.dll (3.0.0.0)
Xpedeon.Attendance.IBLL.dll (3.0.0.0)
Xpedeon.Attendance.IDAL.dll (3.1.0.0)
Xpedeon.Attendance.SqlServer.dll (3.1.0.0)

Upon installing patch which got generated based on 1st MSI and 2nd MSI it should do the following:

Update the following DLL with the version as

Xpedeon.Attendance.IDAL.dll (3.1.0.302)

Following Temp File "Temp Files List" should get created in Temp Folder and the content should be

Xpedeon.Attendance.IDAL.dll

Upon installing patch which got generated based on 1st MSI and 3rd MSI it should do the following:

Update the following DLL with the version as

Xpedeon.Attendance.BLL.dll (3.1.0.302)

Following Temp File "Temp Files List" should get created in Temp Folder and the content should be

Xpedeon.Attendance.BLL.dll

However system creates a temp file with the following content only "Xpedeon.Attendance.IDAL.dll" which is from 2nd MSI.

Regards,

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

Re: Temp File is not getting updated.

Hello Sandeep,

Thank you for the provided resources.

I might be missing something here, because I am still not able to replicate the described behavior.

So basically, here is what I did:

- installed the first MSI

- opened the PATCH project and built it, creating a patch between first and third MSI

- run the patch --> here is the file I get in the %temp% folder:
patchFile.png
patchFile.png (252.78 KiB) Viewed 4384 times



Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: Temp File is not getting updated.

Hi Catalin,

Now delete the existing content in Temp Files List.txt and add the following:

Xpedeon.Attendance.IDAL.dll.

Build the MSI and create an MSP out of it and install the msp. Now check for the content in Temp File, it still displays the old values instead of new value.

Regards,

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

Re: Temp File is not getting updated.

Hello Sandeep,

I have run some few tests on my end and I indeed managed to reproduce this.

Please note that this might happen because the root image of the patch is the same.

If you want the file to get updated, pelase create the patch from the new MSI installed.

For instance, let's consider the following:

- first MSI is installed

- now you create patch between first and second MSI ==> in 2nd MSI being installed basically after the patch is applied

Now, if you want the file to be updated, you should create a patch between the second and third MSI, not between the first and the third MSI.

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

Return to “Common Problems”