cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Marachkovski
Level 4

How to create directory with name = ProductCode.

I want to copy one of my components to directory with name = [ProductCode].
But i didn't find any way to create such folder.
Script is not acceptable, because it fails at Vista.
How to do this using standard InstallShield features?
Does anybody know answer to this question?
Labels (1)
0 Kudos
(7) Replies
cbragg
Level 7

If we are talking MSI project then its relatively straight forward.

-Set up a directory with a 'dummy' name
-Create a set directory custom action and set the value to be [ProductCode]
-Sequence it in the InstallExec sequence just after costfinalize for immediate execution.

During runtime your dummy directory name will actually be the product code. Please note, the set directory action is not a script, it's built in functionality of IS
0 Kudos
Marachkovski
Level 4

Thanks for reply.
I use Basic MSI.
I already tried those steps. After click at install button i get following error "Error 1606. Could not access to network location {productCode}".
Any ideas?
0 Kudos
cbragg
Level 7

Uncompressed source?
0 Kudos
Marachkovski
Level 4

Compressed Network Image without Setup.exe (Single MSI).
0 Kudos
KathyMorey
Level 10

When you create your dummy directory, what are you using as its "starting point"? Is it based off of TARGETDIR, INSTALLDIR, one of the pre-defined folders?
0 Kudos
Marachkovski
Level 4

I want for my component to install in c:\program files\A\B
Where B = [ProductCode]
Records from my Directory table.
Directory Directory Parent Default Directory
INSTALLDIR NEW_DIRECTORY2 .
NEW_DIRECTORY2 ProgramFilesFolder A
B INSTALLDIR B

I created "Set a directory" custom action which set B = [ProductCode].
During install i get error already described above.
0 Kudos
Cromagnon35
Level 4

I've used Properties as directories plenty of times in Basic MSI...

I create the folder in the 'Files and folders' task pane and use []'s around the property. For example:

Program Files\My Application\[ProductCode]

Note that the property is case sensitive (in case you didn't realize)
0 Kudos