David ...
Thanks for the response! You said:
>PltRemoveInstallFile() would be used to remove the files that you placed there
>using PltInstallFile() or PltInstallFileFS() during your installation program.
>Perhaps one case would be when an installation fails for some reason and the
>files need to be removed.
I've got the following code in my installer, just as a test:
OSErr err;
err = PltInstallFileFS(userName, &toInstallSpec);
PtoCcpy(fileName, toInstallSpec.name);
err = PltRemoveInstallFile(userName, fileName);
My file, toInstallSpec, is properly copied to the Files To Install
folder for the user <userName>. PtoCcpy makes a c-string out of the
file name. I then use that file name - the c-string equivalent of
the file name in the FSSpec I used in the PltInstallFileFS routine -
in the call to PltRemoveInstallFile().
PltRemoveInstallFile() returns a -43, although I can see the file is
in the directory. Just for kicks, I tried passing in a pascal string
as the filename, toInstallSpec.name. In that case,
PltRemoveInstallFile () returns a -506.
I must be missing something obvious here. Any ideas?
>If you would like to specifically identify the file, you can also use
>PltRemoveInstallFileFS(TCHAR *pUser, FSSpec *fsSpec).
Yes, this would work as well. I can use PltRemoveInstallFileFS() to
remove the file that I copied to the Files To Install folder with the
PltInstallFileFS() routine. To use it to remove a failed install
file from the Files To Install folder, I'll need the spec of the file
I installed.
I can build a spec using the path returned by iterating through the
Files To Install folder with PltGetFileName(), but I figure there's
got to be a better way to do this.
Thanks so much for your help!
John
---
[EMAIL PROTECTED]