Issues with files being removed after reboot.
In the past month the installer we have been using for years started writing files out to PendingFileRenameOperations to be renamed. Outside of adding a new side image no other changes have been done. No message to reboot was displayed. To my knowledge we do not hide this message because we rely on the installer to tell the user. The files being locked didn't make any sense because I was testing on a closed system and the application has never been ran on any of these VM's. With it being a closed environment there was no chance the application would be started by anyone else. I added multiple reboot tests to the SetupBuilder script. I tested right after the uninstall and before the installer finished. $SB_RESTARTFLAG$ flag was never set. I tested on multiple OSes. I tested on 2008 R2, 2012 R2, 2016 R2, Windows 7, Windows 8.1 and Windows 10. I am on SetupBuilder Developer Edition 2019.5 Version: 10.0.6275. My script version has been upgraded but was originally SB7 and still says SB7. The text at the top says Created with build: 7.0.2680. I realize that just because the script worked for years does not mean it will always work. I guess I am looking for something else I can test to see why this is happening all of a sudden.
I tested this issue two different ways and in both cases I made sure there were no files in PendingFileRenameOperations. None of these installs or uninstalls set the $SB_RESTARTFLAG$ flag.
1. I tested by just uninstalling the program. When the uninstall finished PendingFileRenameOperations had 72 lines of files that needed to be renamed or removed. All of the files were in groups of three. However the directory no longer existed because the uninstall was successful. I would have expected the files to still be in the directory if they were locked.
2. I ran the installer. The installer uninstalls the program then reinstalls it. This removed the directory and then reinstalled to the same directory. No errors. The same files were in PendingFileRenameOperations. Now when I reboot after the install even thou I was not instructed to those 24 files get removed. I have no idea whether this is because the BACKUP directory does not exist or if it is because there are three lines instead of two. Either way the files get removed and the application will not start.
Below is three of the files that were in PendingFileRenameOperations.
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.v1 9.1.dll
\??\C:\Program Files (x86)\CompanyName\ProductName\BACKUP\Infragistics4 .Win.v19.1.0001
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.v1 9.1.dll
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.Ul traWinTree.v19.1.dll
\??\C:\Program Files (x86)\CompanyName\ProductName\BACKUP\Infragistics4 .Win.UltraWinTree.v19.1.0001
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.Ul traWinTree.v19.1.dll
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.Ul traWinToolbars.v19.1.dll
\??\C:\Program Files (x86)\CompanyName\ProductName\BACKUP\Infragistics4 .Win.UltraWinToolbars.v19.1.0001
\??\C:\Program Files (x86)\CompanyName\ProductName\Infragistics4.Win.Ul traWinToolbars.v19.1.dll
Re: Issues with files being removed after reboot.
Hello,
it's not really the installer that is writing to "PendingFileRenameOperations". The installer detects "locked" (in-use) files and as a result, Windows logs them for being renamed at the next reboot. But by default, there should be a "Restart" message at the end of the installation (if the installer replaced in-use files). If it is a silent installation, I would suggest to check the status of General Information -> Advanced Settings -> Reboot Message at Silent Install
BTW, using a .sb7 extension in SB10 is not a problem. All (upgraded) project files formats are fully backward compatible. The text at the top (created with 2680) is just a script comment.
Friedrich
1 Attachment(s)
Re: Issues with files being removed after reboot.
This is not a silent installation. Even if a reboot was required it still would not put the files back correctly. The "BACKUP" path does not exist. In the case of an uninstall only the whole directory no longer exists. If the program has never been loaded then I wonder what is locking the files. The installer? Windows? Anti-Virus software? I installed dozens of times at some point I would think these files would not be locked especially right after a reboot.
Here are my generator and advanced settings.
Attachment 4955
Re: Issues with files being removed after reboot.
If there are files in PendingFileRenameOperations then the installer had to replaced locked (in-use) files. The Windows API to check for write permission returned FAILED. By default, the un-/installer always asks for a reboot if it replaced in-use files. If you are interested, send me your project file (including custom .sbi files) and I'll review your script. It would be cool if you could give me access to your setup.exe. Then we can debug it in real-time.
Friedrich
Re: Issues with files being removed after reboot.
I received permission to send the script and the exe. Where do I send it?
Re: Issues with files being removed after reboot.
Could you please send it to support@lindersoft.com
If the .exe is too large, it would be great if you could send us a download link.
Thank you!
Friedrich
Re: Issues with files being removed after reboot.
I emailed the files and a link to the installer. On Nov. 5th. I have not received a response yet.
Re: Issues with files being removed after reboot.
Sorry for the delay. There's too much going on here at the moment. Testing a hotfix for a Windows 10 update right now.
We'll check your project tomorrow.
Friedrich
Re: Issues with files being removed after reboot.
Hello,
unfortunately, we were unable to reproduce it here on our test machines (VMs).
What steps are required to see this issue? Do we need a previous version and the new TVInstaller.exe? We do not get an uninstall prompt when doing a reinstall with the same TVInstaller.exe
Thank you!
Friedrich
2 Attachment(s)
Re: Issues with files being removed after reboot.
Hello,
okay, it took some time to find out what causes the issue in your project. It's caused by your Line 302 (see attached screenshot). Why do you remove this BACKUP folder?
Our debugging process found out that you install several files multiple times. For example:
Infragistics4.Documents.Core.v19.1.dll
Infragistics4.Documents.Excel.v19.1.dll
Infragistics4.Documents.IO.v19.1.dll
… and more ...
Installing the same file multiple times creates backup copies in the BACKUP folder. The main problem here is that you remove the backup folder after your installation.
To fix your problem:
1. Do not install the same files multiple times (I think it's caused by our wildcards *.*)
2. Do not remove the BACKUP folder
And as a side note, the registry manipulation in lines 210 and 211 is not allowed in Windows. Please remove the "Wow6432Node" entries.
Does this help? After you have fixed this, your install and uninstall should work again as expected.
Friedrich