Robert Kock
Posts: 4
Joined: Fri Dec 22, 2023 1:00 pm

Uninstall error: I/O on thread could not be cancelled. Error 1168

Fri Dec 22, 2023 3:12 pm

I consistenly get error "I/O on thread ... could not be cancelled. Error: 1168" when I try to uninstall a previously successful installation.

In order to get the logfiles, the installation was executed as follows:

Code: Select all

C:\Users\kock\Desktop>msiexec /i C:\Users\kock\Desktop\SirenINP.msi /L*V C:\Users\kock\Desktop\install.log
while the uninstall was done by:

Code: Select all

C:\Users\kock\Desktop>msiexec /x C:\Users\kock\Desktop\SirenINP.msi /L*V C:\Users\kock\Desktop\uninstall.log
Please find attached the logfiles as well as the project.
Attachments
SirenINP.aip
Project file
(89.5KiB)Downloaded 138 times
install.log
Install log
(674.45KiB)Downloaded 146 times
uninstall.log
Uninstall log
(98.93KiB)Downloaded 134 times

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Uninstall error: I/O on thread could not be cancelled. Error 1168

Wed Jan 03, 2024 9:36 am

Hello and welcome to our forums,

Sorry for the delayed reply on this.

It seems that the uninstallation fails because the MS_INSTALL_DIR property remains empty during uninstallation.

The value of the MS_INSTALL_DIR property remains " " which is not a valid path and cannot be accessed by the installer.

I see that you try to set it in the "GetMsInstallDir" custom action, but I'm not sure why it still keeps the empty value.

Do you reproduce this problem on multiple machines? Can you try to debug that custom action and see if the "MS_INSTALL_DIR " property is initialized as expected?

You can initialize the property to [WindowsVolume] or other path directly in the "Properties" page or you can add the "Set installer property" custom action after the Searches action group. Can you try this and see if it works?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Robert Kock
Posts: 4
Joined: Fri Dec 22, 2023 1:00 pm

Re: Uninstall error: I/O on thread could not be cancelled. Error 1168

Wed Jan 03, 2024 4:27 pm

Hi Liviu,

Thank you very much for your reply.
Though your answer didn't resolve my problem directly, it put me in the right direction:
As stated in the final answer of the topic viewtopic.php?t=35108
If the package is uninstalled with Basic UI or in silent mode all the custom actions present on the Wizard Dialogs Stage will not be executed.
I therefore created new custom actions (that resolve some directories) that are executed only during uninstall and put them within the Install Execution Stage.

Everything works fine now.

Thanks again,
Robert

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Uninstall error: I/O on thread could not be cancelled. Error 1168

Thu Jan 04, 2024 9:04 am

Hello Robert,

It's great to hear that everything is now working as expected.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”