PDA

View Full Version : CopyFile'd files are not uninstalled in Windows 98



stewed
10-20-2003, 08:23 AM
I have an InstallScript project that installs a number of files by calling CopyFile(). When I uninstall the application in Windows XP the CopyFile'd files are removed (as they should). When I run the same installation (a self-extracting executable file) in Windows 98 SE, uninstalling it doesn't remove the CopyFile'd files.

Shouldn't the uninstallation behave the same in all Windows OS versions?

DevinEllingson
10-21-2003, 12:44 AM
stewed,

The setup should work the same way in either case. To debug the problem first check whether the files in question are in listed in the log (.ilg) file of the setup on both platforms.

Devin Ellingson
InstallShield Software Corporation

stewed
10-21-2003, 02:03 AM
I compared the two log files and the one from Windows 98 SE lists only the directories created by the CopyFile() operations, not the actual files being copied (in section setup.ilg/APP_MAIN_LOG/<Data>/File Operations). The log file from Windows XP correctly lists both directories and files.

For example:

Windows 98 SE:

C:\MyFiles\Dir2\
C:\MyFiles\
C:\MyFiles\Dir1\
C:\MyFiles\
C:\MyFiles\Dir1\
C:\MyFiles\


Windows XP:

C:\MyFiles\Dir2\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file3.txt
C:\MyFiles\Dir2\
C:\MyFiles\
C:\MyFiles\Dir1\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file2.txt
C:\MyFiles\Dir1\
C:\MyFiles\
C:\MyFiles\Dir1\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file1.txt
C:\MyFiles\Dir1\
C:\MyFiles\

I also tried to call XCopyFile() instead of CopyFile(), but the behaviour was still the same.

DevinEllingson
10-21-2003, 02:09 PM
stewed,

The next step would be to verify that the files are actually getting copied by XCopyFile (i.e.) did you check the return value of this call? Also, did you make sure that the files didn't exist in the target location to verify that the copy actually took place?

Devin Ellingson
InstallShield Software Corporation

stewed
10-21-2003, 02:35 PM
I know for sure that the files are indeed being copied. I made sure the files didn't exist, then ran the setup and after the installation was done the files had been installed. I haven't checked the return code from CopyFile/XCopyFile though... I'll do that when I get to the office tomorrow morning (it's 9.30 PM here now).

stewed
10-22-2003, 03:05 AM
When I run the setup in Windows 98 the call to CopyFile() returns error code 0x80070005 (Access is denied) even though the file is successfully copied.

I guess that could be the reason why the file isn't logged. But why do I get an "Access is denied" error even though the copy operation is successful? The file is evidently copied into the correct target directory.

stewed
11-11-2003, 07:15 AM
Any progress with this one?