zhiyong201
Posts: 3
Joined: Thu Nov 20, 2008 10:29 am

How can I know which path to be installed

Hello ,
Now I want to know which path of the program have been installed by users .
When the program is be uninstalled,I create a .vbs to delete the program's folder,but I do not
know which path users custom , have you some suggestions?

Thank you for reading my question !
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: How can I know which path to be installed

Hi,

Behind "Application Folder" from "Files and Folders" page resides the APPDIR property. This property indicates to folder where user chose to install the application. You can use this property in your script. The code to access a property in a .vbs script looks like this:

Code: Select all

strAppFolder = Session.Property("APPDIR")
However why exactly do you want to delete the application folder by hand since this is done automatically by Windows Installer (excepting the files that are not created by the installer, for those you can use a "File Removal" operation) ?

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
zhiyong201
Posts: 3
Joined: Thu Nov 20, 2008 10:29 am

Re: How can I know which path to be installed

At first thank you for answer my questions!

And I hava used the "File Remove" operation . What I exactly to know is that How can I know which path of
the program when it is been installed when users appoint a custom path to install it ? Then I get it to be delete
which are need to delete !
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How can I know which path to be installed

Hi,

In an Advanced Installer project the application files are usually placed in "Application Folder" from the "Files and Folders" page. This folder uses the property APPDIR to store its path, even after it is changed by the user. Therefore, you can access the installation path by using the APPDIR property (like Gigi suggested).

During an uninstall, Windows Installer will automatically remove all the files and folders registered in the MSI (the ones you create or add in your project). However, Windows Installer will not remove the files created by file operations, custom actions or by the installed application. For these files you can use one of the approach in the Remove a file or a folder during installation how-to.

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

Return to “Common Problems”