mjvitale
Posts: 20
Joined: Tue Apr 05, 2005 7:58 pm
Location: Falls Church, VA

cannot replace executable file in my project

I am trying to upgrade my program's installation. I changed the code from x.x.x to x.y.y and then was prompted to generate another product code, which I said YES to. I saved it and then proceeded to the application folder under files and folders and attempted to delete my program's executable since I want to add the newer version to this build. But I got this error:

Cannot delete file, "<MyFileName.exe>": It is referenced from another component.

I tried deleting every reference to it in the build, like where I defined it as a shortcut (desktop folder), and where I used it as a custom action, but still I cannot replace this executable file.

Please advise.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

In case somebody else has this issue:

1. The best way to change file is not by deleting and adding it again, but by going to its Properties dialog and changing its Source.

2. To remove a file, make sure first you are not using it somewhere else in your install: Custom Actions, UI, ODBC, Services, etc.

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”