This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Deleting a file after processed
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 17, 2008
01:37 AM
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.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 19, 2013
12:12 AM
Try Long Path Tool it is the easiest way that can solve your problem.