sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

InstallState & InstallLog files left behind on uninstall.

Hello,

I have an advance installer project with three custom actions that are run on install and they use 3 installed files, file1.exe, file2.dll, file3.exe say. Once the install is complete there are four extra files placed in the appdir directory named, file1.Installstate, file1.InstallLog, file2.InstallState and file2.InstallLog.

This causes a problem when the project is uninstalled as the previous application directory is not deleted and these four files remain.

Any ideas on how to remove the directory without forcing it would be great.

Thanks

Sj
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: InstallState & InstallLog files left behind on uninstall

Hi,

A solution is to use file removal operations in Files and Folders page. This way you can remove only the files you want using native Windows Installer support.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Re: InstallState & InstallLog files left behind on uninstall

That was my solution could you explain why these files are left behind? I have 40+ installer projects if this is going to happen a lot its going to start getting annoying. It would be good if there is something I could do to avoid it.

Thanks very much.

Sj
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: InstallState & InstallLog files left behind on uninstall

Hello,

By default the uninstallation removes all resources declared in the Files and Folders page.
This is happening because the files are created via custom behavior attached to the installer. All files created by custom means, must also have a defined removal.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Re: InstallState & InstallLog files left behind on uninstall

Hi There,

This was my fault these files were being generated by installUtil.exe. To stop the log file being created I added an empty path on the LogFile switch.

Code: Select all

InstallUtil.exe /LogFile="" [assemblyPath]

and I added an uninstall custom on the same command with the uninstall switch set which removed the .installstate file.

Code: Select all

InstallUtil.exe /uninstall /LogFile="" [assemblyPath]


Sorry about that.

Sj
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: InstallState & InstallLog files left behind on uninstall

No problem, let us know if you have any other doubts or queries.

All the best,
Mihai

Return to “Common Problems”