View Full Version : Trouble deleting an icon from the FOLDER_DESKTOP

Tim Mayert
04-13-2002, 04:37 PM
I am creating in install with Developer 7 and I have set up the install so that if it detects the previous install, created with IS6.x, that it would go in and remove everything. Everything gets removed properly, but when it comes to deleting the Desktop icons it will fail.

Here is the code that I use to do it.

svIcon = @PRODUCT_NAME + " 2.02";
if ( DeleteFolderIcon ( FOLDER_DESKTOP, svIcon ) < 0 ) then
MessageBox ("DeleteFolderIcon failed.", SEVERE);

Is there something I am doing wrong?

Is there a better way to uninstall the previous build?

In IS6.x I could make it so that if it found an older version, created in IS5.x, it would be able to perform a silent uninstall of the product. Can the same thing be done with IS6.x?

Any help would be appreciated.

04-15-2002, 12:54 PM

I would suggest the following:

1. Get the return code from DeleteFolderIcon, this should provide more information on why it's failing.

2. I would recommend silently uninstalling the old Pro setup if it is found. The KB# Q105066 explains more on this process, and the steps would be the same for Developer. Simply record your old Pro 6 setup's uninstall, then launch it in Developer with a -s parameter.

I hope this helps!

Tim Mayert
04-16-2002, 07:51 AM
Thanks for the information.

I thought it would be great to perform a silent uninstall on the previous install, but that unfortunately failed to work.

I ran the Setup.exe -r and performed an uninstall with the product. Once it was done I did the install again and this time I placed the Setup.iss file into the directory where the Setup.inx was located. I then ran the Setup.exe -s and it would always fail with a -3 error, which means:

-3 Required data not found in the Setup.iss file.

What data is missing? why did IS make it able to log the uninstall in record mode, but when it comes to silent mode it is very picky????

Is there a way to fix this so that uninstall can be done silently or will I now be stuck trying to figure out why my icons are not being deleted manually.

This is turning out to be a pain... :(