Quartz
asked on
Erase "uninstal.exe" in execution (2)
Hi,
For Delphi 1.0 / Win 3.1
I'm writing an un-install program. I whant to know how
can i erase the file "uninstal.exe" in execution ?
I have the error message: "file access denied".
I do not whant to know if i have to experiment with DOS "lock".
I do not whant to know if i have to flag it directely in HD FAT.
I do not whant to know what other coders do (leaving the file there).
The answer must be a procedure or a function in Delphi 1.0 codes.
I know it not a big procedure, then you can easy put it in a message.
Thank in advance,
Quartz
For Delphi 1.0 / Win 3.1
I'm writing an un-install program. I whant to know how
can i erase the file "uninstal.exe" in execution ?
I have the error message: "file access denied".
I do not whant to know if i have to experiment with DOS "lock".
I do not whant to know if i have to flag it directely in HD FAT.
I do not whant to know what other coders do (leaving the file there).
The answer must be a procedure or a function in Delphi 1.0 codes.
I know it not a big procedure, then you can easy put it in a message.
Thank in advance,
Quartz
ASKER
I was thinking about others solutions. I always think executive file are all load in memory before it start then close the file.
I have some programs like Asymetrix3DFX and HP JetAdmid who have an uninstal program and erase the file.
Ok, for the restart of Windows, but in Win 3.1 i do not have the "winini.ini". Is there something similar of "NULL=fname" for the file "win.ini" of Windows 3.1 like my question mentioned ?
I have some programs like Asymetrix3DFX and HP JetAdmid who have an uninstal program and erase the file.
Ok, for the restart of Windows, but in Win 3.1 i do not have the "winini.ini". Is there something similar of "NULL=fname" for the file "win.ini" of Windows 3.1 like my question mentioned ?
Let me check, I'll get back to you today.
ASKER
After many days...
ASKER
Edited text of question
ASKER
Adjusted points to 150
ASKER
Adjusted points to 200
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi there,
any comments ?
any comments ?
ASKER
Hi, sorry for the time for my answer to you.
After testing your sugestion, it not what i was asking but it working ok. I execute the .bat file on the event "OnDestroy" of my form and it working good.
Thank for your help and i give you your's points.
See you..
Luc
After testing your sugestion, it not what i was asking but it working ok. I execute the .bat file on the event "OnDestroy" of my form and it working good.
Thank for your help and i give you your's points.
See you..
Luc
The way to remove a busy file is to use the WinInit processing facility. Make the NUL=fname entry in the WinInit.INI file and on the next restart, WinInit.EXE will delete the file.
If you are not familliar with this, I can be more specific.
Cheers,
Ian C.