View Full Version : I cannot remove some files
cdundee
07-19-2007, 10:50 PM
When I try to remove some files, I get an error message: Failed to remove item: "c:\foldername\filename.txt".
Does anyone know the reason why the file cannot be removed?
Plus, I tried to remove the component but nothing happens i.e., after I click on remove button the component stays in place...it is not removed.
The file I am trying to remove has a shortcut but I still cannot remove the file even after removing the shortcut.
Thanks.
Lorne
07-20-2007, 09:50 AM
Are you trying to remove a file from the project (inside Setup Factory), or are you trying to make an installer that removes a file during an installation?
Can you describe the steps you're taking in greater detail?
cdundee
07-20-2007, 10:34 AM
I am trying to remove the file from the project (inside setup Factory).
I created a setup factory project with some files in it. I went to the properties of two files (one at a time) and then checked the checkbox to create program menu shortcut. I saved my project and generated the setup.exe file. Then I started removing the files from the project. All the files were removed successfully except the ones that I checked the checkbox for shortcut. I dont know if it was a coincidence that only the files with shortcuts checked were not removed or it is a bug.
Neither the toolbar remove button nor right-click remove option worked. I got an error:
Failed to remove item: "c:\foldername\filename.txt"
No matter what I do I cannot remove the file from the project.
Thanks.
Lorne
07-20-2007, 10:40 AM
Hmmm, that definitely shouldn't happen.
Are you able to reproduce this in a new project?
What version of SFWI are you using?
cdundee
07-21-2007, 09:48 PM
I am using version 1.1.1004.0. This has happened twice in two separate projects. I will try to keep an eye on this and let you know if this happens again.
Thanks.
JXBURNS
07-22-2007, 05:52 AM
For what it's worth, I am unable to replicate this either using 1004 on a brand new project.
However, I was able to replicate on an old (I think probably beta built project) using 1004 where the original file was missing (shown in red) and the destination set to ProgramFilesFolder (INSTALLDIR). I don't know whether it is the fact the file no longer exists or the destination causing the problem. Obviously beta built project I would not expect to ncessarily work through into production.
I've attached the project as it was only ever used in beta testing, never completed and has nothing confidential in it if it helps.
Rgds John
JXBURNS
07-31-2007, 04:11 AM
Has there been any resolution to this as it is now affecting a brand new project I have built in 1004?
The steps I took were (if it helps):
a) Added files and folders from PF\Draeger folder on source media.
This then became PF\MY PRODUCT\Draeger in SUFWI.
b) Renamed MY PRODUCT against INSTALLDIR to Draeger.
c) Moved folders underneath INSTALLDIR\Draeger up one level so they are now sub-folders of INSTALLDIR.
d) Tried to delete a EXE file. Got the 'Failed To Remove Item:' message. However deleting a INI file (for example) worked fine as did all other non-EXE files I tried.
Note I have not yet built a MSI from this project.
Rgds John
tdexter
08-01-2007, 04:13 PM
I just ran into the same issue. The file is a .EXE, that may be the key(.EXE) I am trying to finish up on our first MSI and now hit a brick wall, help.
Brett
08-01-2007, 04:23 PM
tdexter,
Can you email me the offending project file so that I can take a look at it? Email brett at indigorose dot com
Lorne
08-02-2007, 12:42 AM
Sorry for the late response, I'm away on holidays right now.
Adam and I got our hands on a project that had this bug last week, and I managed to track down the bug that was preventing the files from being deleted. I was able to fix the bug, so in the current internal build we should be able to delete those files now. (Brett: if you load one of these projects into a current build of SFWI, you should be able to delete the files.) The fix will be released in the next version (1.1.1005?).
In the meantime, there is a workaround that you can perform to make those files deletable if you're familiar with XML.
Make a backup of your setup factory project file (just in case).
Open the project file in a text editor like UltraEdit or Notepad, or a good XML editor if you have one.
Search for the component ID or filename of the file that can't be deleted. You should find a SetupItem element for that file and component ID.
Find the UserProfileComponentId in that SetupItem element. (It will be inside a ShortcutData element.) It should be something like sufupscid_0001, sufupscid_0002, etc.
Load the project file into Setup Factory, go to the Components dialog, and create an empty component with that name (e.g. sufupscid_0001). Click OK.
You should now be able to remove the file from the file list. (When you remove the file, the component you created will be removed automatically.)
Sorry if that isn't very clear; I'm going from memory.
tdexter
08-02-2007, 08:11 AM
That worked out great.
Thank you
JXBURNS
08-02-2007, 04:32 PM
Ditto Thanks Lorne.
Sorry if that isn't very clear; I'm going from memory.
I too am on vacation but (with deference to my old Novell server) I tend to get 'short term memory allocation exhausted' messages if I try to recall from my brain storage what you just managed to type from yours!:lol
Have a good one.
Rgds John
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.