View Full Version : Install two folders in a different Location?

vicky rawat
10-26-2005, 04:14 AM
Hi Friends,

As i m new to the Installshield 11 Express Edition.I want to copy the two folder in a different Location of Target machine.

For Example: there is two folder called X and Y.And I want to copy folder X in C:\windows\ and Y in D:\ .

Can someone Help me out.I have some urgent Deliverables.

Thanking you

10-26-2005, 05:59 AM

I use InstallShield X . I had to move some files of the installation to another directory.

The solution to this is:

1) You have to create a Script Defined Folder named say :<Destination>
=> This can be done from the Application Data > Files and Folders View
( It is above the Appilcation Target Folder in the tree )
2) Add the files to this folder.

3) Next in your InstallScript in the function OnMoveData(),

add the following code:

nDisk = 1;
ComponentSetTarget( MEDIA, "<Destination>", sPath );
nResult = ComponentMoveData( MEDIA, nDisk, 0 );

sPath is the physical path you want the files to be moved.

This should work.. hope it helps


10-26-2005, 11:02 AM
The code varunparange offered applies to InstallScript (and maybe InstallScript MSI) projects, and will not work for InstallShield Express editions. In Express you should be able to right click in the Files and Folders view and create a C: or D: "folder" off the destination computer, and then various folders beneath them, until you can then place files in the desired subfolders.

This sort of use of drive letters is not generally recommended, as your install will fail to run on a machine that lacks one of these drives. However if you are installing to a controlled homogenous environment, that may not be a concern.