fullcity
Posts: 13
Joined: Tue Aug 26, 2008 10:18 pm

Best approach for renaming a file...?

Hi there,

Our installer needs to rename one of the installed components upon uninstall. What would be the best approach to doing this? I'm relatively new to AI and am still feeling my way around it's very rich feature set.

Thanks,
Adam Aronson
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Best approach for renaming a file...?

Hi Adam,

I'm not sure I understand what you need to do. Can you please give me more details about this? Do you need to rename a file installed by the package or a file which already exists on the target machine?
Please note that all the files installed by the MSI package will be removed during an uninstall (unless you specify otherwise).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fullcity
Posts: 13
Joined: Tue Aug 26, 2008 10:18 pm

Re: Best approach for renaming a file...?

Hi Cosmin,

I simply need to rename one of the files installed by the installer and have the installer not remove that file.

Thanks,
Adam
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Best approach for renaming a file...?

Hi Adam,

In order to rename a file you can use a custom action. You can find some sample VBScript code here:
http://www.activexperts.com/activmonito ... meFile.htm

Since you want to rename the file during an uninstall, the custom action can be scheduled under "InstallExecuteSequence" -> "Uninstall". You can make sure that the file will not be removed during the uninstall process by using the Permanent attribute for its component.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”