cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
reeceboucher
Level 2

delete existing files

Greetings from a newbie.

I have a need to delete files that already exist on a desktop folder and have been unable to work out how to do it.

I have defined entries in the RemoveFile table as below...

FileKey FileKey1 (default)
Component Component_ (default)
FileName msi-delete.txt (test filename)
DirProperty DesktopFolder

I have read the post that I thought was closest in relevance (‘How to remove a file if found’ by capsulecorpjx, 02-03-2006 @ 04:54 AM) and thought I followed the steps but was unsure about the correct DirProperty designation.

Essentially there is nothing much else in the Basic .MSI apart from the delete file. This is needed to remove a desktop shortcut that already exists (not part of another .MSI) prior to installing a new one.

Your help is appreciated.

‘assume no knowledge exists, and we’ll work up from there’:D
Labels (1)
0 Kudos
(3) Replies
KathyMorey
Level 10

So, you have a default feature and a default component? And it's the default component that is listed in the RemoveFile table? What InstallMode is set?

As an aside, you do realize that this MSI will show in Windows Installer's registry area as "installed" even though all it did was remove a shortcut, right?
0 Kudos
reeceboucher
Level 2

kathy,

InstallMode set to 1

Yes I realise it will show in the registry. I need to install other components but one of my deliverables is to remove a desktop shortcut that already exists.
0 Kudos
KathyMorey
Level 10

Have you tried logging the install? That will tell you if the component was selected for installation and may indicate what other issues exist.

And although this certainly sounds like a very simple install project, you might also want to run validation on it to see if that shows any problems.
0 Kudos