Reputation: 83
I have created setup file(msi) for my windows application using install shield. The problem is when i uninstall the application from control panel,except 2 files remaining files got removed from installed directory. But i want to have the whole installed directory to be removed. Any help is appreciated.
Upvotes: 3
Views: 2313
Reputation: 27786
Those files are created by application.It is just bin files of winforms.
Windows installer automatically removes files on uninstall only if it has installed them before. It won't automatically remove other files because these might be user files.
The solution is to explicitly tell Windows Installer to remove the left-over files on uninstall. I can't tell you exactly how to do that using InstallShield but I'm fairly certain that it has a feature for that. The WiX toolset for example has the RemoveFile
element which writes entries to the underlying RemoveFile
table of Window Installer.
Explicitly removing the directory should not be necessary as Windows installer will do that if the directory is empty (after all files have been removed). If you still see an empty directory left over (your application may have created), there should be a feature of InstallShield where you can define directories to delete on uninstall. For example the WiX toolset has the RemoveFolder
element which writes entries to the underlying RemoveFile
table of Window Installer.
Upvotes: 4
Reputation: 20790
Two things:
In a Visual Studio setup project (that doesn't offer support for the RemoveFile functionality) you'd need to run an uninstall custom action to remove those files. That may be trickier than you expect because you'll need to remember that actual install folder - Windows doesn't do it for you - and then remove the *.bin files.
If these are temporary files that are left behind from running the app and you don't really need them, then create them in the standard Temp folder, because:
a) The program files folders are not really intended for data storage, and locating them in Temp will solve your problem.
b) The Temp folder files typically get removed periodically by the user cleaning disk, by automatic cleanup etc. In other words nobody really cares if you leave behind small files in Temp.
Upvotes: 2
Reputation: 2825
Please check, whether the component is shared, if it is shared for no reason.
Please set the shared to No.
Still it is not deleted, create a custom action to delete the files.
For more details refer below
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371199(v=vs.85).aspx
Upvotes: 0