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!

Gringo
Posts: 10
Joined: Fri Feb 02, 2007 6:11 pm

Uninstalling File Copy/Move elements

Hi,


I need to copy some pre-existing files from a property based location into the Application Folder during install. For that, I'm using the File Copy/Move functionality in the Files and Folders. Works fine during installation, but during uninstallation, these files don't get removed ? What am I missing ?


thx
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Because those files are not controlled by Windows Installer you need to write a custom action to remove them.

See this for a custom action example:
http://www.advancedinstaller.com/forums ... ght=remove

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Gringo
Posts: 10
Joined: Fri Feb 02, 2007 6:11 pm

Thanks, that works.
Gringo
Posts: 10
Joined: Fri Feb 02, 2007 6:11 pm

I have a follow-up on that: Since I don't want to rely on an installed WSH I've created a TCL script for this custom action (Tcl/Tk gets installed together with our App).

So at the end of the installation, I'm calling the previously installed Tcl interpeter and provide the script (path and name) in the command line.

Is there any way that I can add this script to the installer in a way that it doesn't get installed together with the application (as I would do with a VBS script) ? It's really just required for the installer, nothing else.

I've only managed to make it part of the installation, put it into [APPDIR] and call it from there.

thx,
Gringo
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Gringo,
Is there any way that I can add this script to the installer in a way that it doesn't get installed together with the application (as I would do with a VBS script) ?
Add those scripts as temporary files and execute them using "Launch File Or Open URL" type of custom action. Read more about temporary files here:
http://www.advancedinstaller.com/user-g ... files.html

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Gringo
Posts: 10
Joined: Fri Feb 02, 2007 6:11 pm

I'm sorry, but I still haven't figured it out. I just found that in order to call the Tcl interpreter, I need to set an env variable first. It seems that it's not sufficient to set that variable in AI's env variables, so I created a wrapper bat file as temporary file, which I then try to call with "[APPDIR]\tcl.bat [APPDIR]".

But: This batch file is not called and AI reports an error:

Code: Select all

MSI (s) (10:2C) [11:30:28:937]: Note: 1: 1721 2: post_install 3: C:\WINNT\Installer\MSI467.tmp 4: C:\Programme\Test\tcl.bat C:\Programme\Test\ 
Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: post_install, location: C:\WINNT\Installer\MSI467.tmp, command: C:\Programme\Test\tcl.bat C:\Programme\Test\ 
MSI (s) (10:2C) [11:31:35:073]: Product: Test -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: post_install, location: C:\WINNT\Installer\MSI467.tmp, command: C:\Programme\Test\tcl.bat C:\Programme\Test\ 
The tcl.bat file is however present in [APPDIR] at this point of the installation.
Gringo
Posts: 10
Joined: Fri Feb 02, 2007 6:11 pm

Ok, I got it, I need to use the viewer.exe call.

There's one issue though which has cost me another half hour: Calling [#tclsh83.exe] is different (and unusable for me) then calling [APPDIR]bin\tcl\bin\tclsh83.exe

[#tclsh83.exe] points to the same file, but this call is blocking (and in fact opens a Tk window), while the other isn't ? Strange.

But now it does what it's supposed to do.

Return to “Common Problems”