PDA

View Full Version : New folder for cloned dialog



John Nero
11-04-2011, 04:00 AM
Installshield 2012 Professional Edition

I did a clone of InstallChangeFolder and want to specify another destination folder in the _BrowsePrperty field (event?) of the change folder.

How do I create a folder like INSTALLDIR? I asumed that it is posible in the Path Variables section but unfortunately I'm not able to create this.

MichaelU
11-04-2011, 01:03 PM
I would generally suggest using the Files and Folders view to create a new folder on the target machine. Once you create that, right click it and select Properties to find or change its Directory Identifier; this is also the property you need to reference in the other dialog.

John Nero
11-04-2011, 03:49 PM
Yep, that did the trick. I created a folder SpoolFolder and in the properties the location is [SPOOLFOLDER]. I changed the BroweProperty to [SPOOLFOLDER]
However wthen I run the installer the folder is c:\My ProductName\.
What must I do more?

skolte
11-07-2011, 01:57 PM
Under Installation Information > General Information tab look for INSTALLDIR, it must be set to [ProgramFilesFolder]My Product Name. Set it to [SPOOLFOLDER].

MichaelU
11-07-2011, 03:59 PM
Also, make sure you created the folder under the INSTALLDIR folder if you want it to default to that location, or override the default with a property or custom action. (Watch out with the custom action approach, though, as you probably don't want to prevent someone from changing it at the command-line.)

John Nero
11-17-2011, 07:38 AM
I successfully cloned the dialog and created a folder newfolder under the INSTALLDIR.
The _BrowseProperty of the Change button points to NEWFOLDER as seen in the properties of this folder.
Every thing works as it should be, I can browse to it etc. but how do I get the contents of it? It isn't @NEWFOLDER or [NEWFOLDER].

I need this value in my installscript (setup.rul).

John Nero
11-17-2011, 10:50 AM
Solved, I use MsiGetProprerty to get the value out of it....

MsiGetProperty(ISMSI_HANDLE, "NEWDIR", szSpoolDir, nSize);