cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vernalissystem
Level 2

Deleting a file after processed

I want to delete a .Net dll which I used for my reference in the installscript. when i try to delete the file using Deletefile command it shows access denied error. But when i try to delete a dll which I never used, is deleted. I want to know how to close and delete the dll which i have used. Please someone help me.


Thanks in advance

My code:

szDll = INSTALLDIR ^ dllName;
szClass = dllclass;
MsiGetProperty(hMSI,"CONNECTION_STRING",ConnectionString,nsize);
set oConn = CoCreateObjectDotNet(szDll, szClass);
if (!IsObject(oConn)) then
MessageBox("Object Creation Failed",SEVERE);
abort;
endif;
econnectionString = oConn.convert(ConnectionString);
set oConn=NOTHING;
result=DeleteFile(szDll);
if(result = 0) then
MessageBox("file Deleted",INFORMATION);
else
szErrsource=FormatMessage(result);
MessageBox("file Not Deleted"+szErrsource,INFORMATION);
endif;

Let me know if i have missed anything.
Labels (1)
0 Kudos
(1) Reply
FrankZabelli
Level 2

Try Long Path Tool it is the easiest way that can solve your problem.
0 Kudos