Hi folks, it's me again,
I mentioned, that all files in use will be removed after uninstallation when the system shuts down. Now all files copied during installation should be removed. But one file will be left. How can I delete all files left after reboot or at another moment. I don't want to left files on the target system.
Thanks for your help
Mõbius
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Removing used files during uninstallation
Started by
Mõbius
, Apr 16 2003 09:39
3 replies to this topic
Posted 16 April 2003 - 19:49
Some files which a program modifies or rewrites (especially INI files) can confuse the uninstaller. Set up a global uninstall flag in OnMaintUIBefore, the try this line in your ONMAINTUIAFTER event:
IF(bUninstall) THEN
DeleterDir(TARGETDIR,ALLCONTENTS);
ENDIF;
If that still doesn't get the files you might need to specify the individual file as well.
DeleteFile(TARGETDIR^"FileName");
IF(bUninstall) THEN
DeleterDir(TARGETDIR,ALLCONTENTS);
ENDIF;
If that still doesn't get the files you might need to specify the individual file as well.
DeleteFile(TARGETDIR^"FileName");
Posted 16 April 2003 - 19:54
Well, but the problem is, that during shutdown this special log file will be altered by the programs in use which are removed after restart. I almost tried to delete all files manually. Do you have another idea?
Posted 25 April 2003 - 21:10
That makes it really difficult then. You could try killing the process that are accessing the files.
Another way to do it would be to make a batch file that deletes the files. Have it accept the directory as an argument. You can then place a command to launch this batch file in the \runonce section of the registry during your uninstall - so that now the files will be deleted after all the programs have stopped running.
Another way to do it would be to make a batch file that deletes the files. Have it accept the directory as an argument. You can then place a command to launch this batch file in the \runonce section of the registry during your uninstall - so that now the files will be deleted after all the programs have stopped running.