I have 2 problems that result in the same error message :
'The process cannot access the file because it is being used by another process.'
My project allows the user to right click on an .msi file within explorer (xp) and that file is then opened for editing. One of the functions I then need to do is rename the file.
Also, if there is a transform (.mst) file in the folder it will also open this file. To allow editing of this file, I create a backup .msi file to allow me to save any changes to a new transform file. This works fine, however when the new transform file has been created, I then wish to delete the backup.msi, but I am unable to.
I have tried everything I can think of (Marshal.FinalReleaseComObject, Dispose()) to remove/rename the files, but they always remian in use until the vb.exe has stopped running.
Can anyone help?
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).