Deleting a file - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

gsimpson
Posts: 13
Joined: Sat Dec 31, 2011 8:13 pm

Deleting a file

Greetings,
I am having some problems and was wondering if someone could give me some advice. I am trying to delete a file that was not created by the installer. For a demonstration, I am creating a Desktop Shortcut to a file called Test.txt. The shortcut is named "Shortcut to Test.txt". This is what I have done in your program.

1. Under Files and Folders, I select Desktop.
2. In the right pane, I right click and select New File Operation -> File Removal
3. I choose the file to delete, in this case it is "Shortcut to Test.txt.lnk",
For the Component I select ProductInformation. (Guessing here)
For the Remove On, I select Component Install.
4. I have left the Conditions blank, since I Always want it to be removed.
To be honest, I am more than a little confused on the Options and the User Guide for file deletion is less than helpful. Makes no sense to me at all.
5. I then run the installer, the file is not deleted.

I am honestly confused here. What do I delete? The Link, the File (which would leave the link, not a good idea, I am thinking).
Why isnt the link getting deleted when the installer is run?

If someone could tell me "In plain instructions" how to delete a file that was not installed by the Installer, I would really appreciate it.

Thank you,
Greg
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Deleting a file

The settings made are good, so the deletion should work. What I suspect is happening is that the package is looking at another "Desktop" folder from your OS.
This is a tricky situation, in the attached sample you can see I've set the install type to "Per user", in Install Parameters page, to be sure that it looks for the shortcut in the Desktop folder.

Regards,
Bogdan
Attachments
test sh.aip
(11.14 KiB) Downloaded 296 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”