View Full Version : Uninstallshild don't delete TARGETDIR

10-20-2003, 06:51 AM
Hello again.

In an Installation I create an unistall link in the TARGETDIR.

szProgram = UNINST;
szProgram = szProgram + " -f" + svUninstLogFile;

AddFolderIcon(svFolder, "deinstallieren", szProgram, WINDIR, svIcon, 0, "", REPLACE);

When i use this link, the uninstallation run's correct.
The mistake of this function is, the TARGETDIR still exist after unintallation.

When i change the attributes of the link and delete the parameter -uninst the uninstallation run's perfekt.

What can i do?

10-20-2003, 10:44 AM
You're running something in a directory you're trying to delete, so it can't be deleted. What can you do?

a) Don't have your uninstall link - Windows standard practice is to uninstall from Add/Remove programs

b) Put your uninstall link in the Start Menu for your program - this should get rid of your problem (and the user won't need to navigate through their hard disk to find the link)

Hope that helps,


10-21-2003, 02:17 AM
Hi Tom.

I'm sorry but the problem still exist. :confused:

There is nothing run in TARGETDIR.
The uninstall link already is in the start menu.
Only when I change the link the uninstallation will run correct.

Do you have a solution to cut the string like array.pop(); in JavaScript?



10-21-2003, 03:42 AM
Hi Tom.

I have found a solution.

szProgram = DISK1TARGET;
szProgram = szProgram + "\\setup.exe";

AddFolderIcon(svFolder, "deinstallieren", "\""+szProgram+"\"", WINDIR, svIcon, 0, "", REPLACE);

I use the variable DISK1TARGET instead of UNINST.

Now it's alright.