cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JimmiLee
Level 6

Installing/copying a file, but not uninstalling it on uninstallation?

This is a 32bit normal MSI project that must install on Server 2003 or 2008...

I use the following code to copy a file to MSCRM:
*********************************************
function CopyDLLtoCRM(hMSI)
STRING strSourceDir, strTargetDir, strSourceFileName, strTargetFileName;
NUMBER nvSize;

begin
//Get target directory from MSI constant
nvSize = 512;
MsiGetProperty(ISMSI_HANDLE, "CRMINSTALLDIR", strTargetDir, nvSize);

//Set source directory
strSourceDir = INSTALLDIR;

//Copy file = microsoft.crm.sdk.dll
strSourceFileName = strSourceDir + "\\microsoft.crm.sdk.dll";
strTargetFileName = strTargetDir + "\\microsoft.crm.sdk.dll";

if(CopyFile (strSourceFileName, strTargetFileName) < 0) then
MessageBox ("There was an error copying the file Microsoft.Crm.Sdk.Dll to the MSCRM Installation. \n" +
"refer to the manual on how to do this manually." + svTemp, INFORMATION);
endif;

end;
*********************************************

I can copy the file, but when uninstalling, I think it is removing it and that causes MSCRM to stop working - how do I prevent it from removing this file?
Labels (1)
0 Kudos
(2) Replies
Johannes_T
Level 6

Check disable(LOGGING) ... enable(LOGGING) in the handbook
Greetings,
Johannes
0 Kudos
JimmiLee
Level 6

I believe this works like a charm . . .

Thanx 😄
0 Kudos