Is it possible to change only a part of INSTALLDIR?


I've built a setup for a customer. It's finished now and I showed this setup to him as he had the wish that users can change the installation directory or drive.
My problem now is, that I need the last 2 subfolders everytime the same. Everything regarding the installation path can be changed, also the drive. But the 2 last folders are absolute!


Default INSTALLDIR is "%ProgramFiles%\STI\OTS\". If now a user wants to change the path to e.g. "D:\Software\" it should be automatically installed to "D:\Software\STI\OTS\". How can I do that?

I'm using WPS 7 by the way [;)]

This is my first post at this board and I hope I didn't miss something like introducing myself before posting or something like that.
I used the search a lot, but couldn't find anything. Same thing with google, etc

0 Comments   [ + ] Show comments

Answers (2)

Posted by: jcarri06 13 years ago
Senior Purple Belt
Hi Viper,

Are you able to make your installation 3 directories deep rather than just 2? For example:


This would let you set your default directory to progfile\whatever so that even if the user changes a path, it will still apply the \STI\OTS to it.

If you're able to add this 3rd directory depth, would be quick and easy to do.
Posted by: viper20p 13 years ago
Senior Yellow Belt
I found a method now to solve my problem. But it's not the best and I don't like it that much. I will describe it a bit:

I made a main feature. This one has no files, no regkeys and so on. It's just the main feature. It's directory to install is C.\Program Files\. Below this I made my sub-features. These contain my files and data. The installation directories of these subfeatures are C:\Program Files\STI\OTS\.
When I install my MSI like this, the "Destination" dialog will show up the path C:\Program Files\ to the user as default. You can change the path now to wherever you want to. And when you hit 'Install' all my files will be installed to the new choosen folder with subfolders ..\STI\OTS\.
Only thing I don't like is, that the user NEVER sees the whole path in the dialogs. When he browses to e.g. D:\Install\ and hits 'Install' it will be installed to D:\Install\STI\OTS\. When he chooses the path D:\Install\STI\ it will be installed to D:\Install\STI\STI\OTS.
Looks not that nice, but it's ok I think. Only thing I really don't like is that the user is not able to see the whole path in the dialog.
The way with my empty main-feature is my only solution until now.

Got anyone has any further suggestions for me?

Thanks in advcance!

Edit: To get this working, you need to change the directory parent of 'STI' to INSTALLDIR in the 'directory' table, not to ProgramFiles. And Program Files is the "default directory".
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ