I have here an installation that makes me problems (I use InstallShield DevStudio 9).
However, in this installation there is a component this one should not be installed into the target directory but on the target drive. For example if the user chooses D:\programs\any_name\... for the installation the component should be copied directly under D:\.
But although I use TARGETDISK as target directory for this component it is always copied on drive C:\ in this example.
Can somebody help me?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Problem with installation to TargetDisk
Started by
el puGo!
, Jul 15 2004 12:18
4 replies to this topic
Posted 15 July 2004 - 14:13

You need to return the disk drive of the TARGETDIR. Use the function GetDisk(szPath, svDisk). The user can also use a UNC path. If a UNC path is used, GetDisk return the server name and the shared device name in the format \\server\sharedevice. If a drive designation is not included, the function will fail.
Return values
0 = success
< 0 = failed to return disk
ret = GetDisk ( TARGETDIR, svDisk)
Posted 15 July 2004 - 14:53
I think I only gave you half of the answer.
I gave you the script method of obtaining the disk drive, but I need to get you the part that needs to be added in the IDE.
Go to Project Assistant. Then click on the Application Files on the lower part on the tab. Add a new folder name to the Script Defined Folders. I named mine <ROOT> for this example.
Now in the Installation Designer, set the Destination property to the <ROOT> folder.
Make sure that in your script, you use the GetDisk(szPath, svDisk) function to define the varable ROOT before you move the data. Do this right after the user interface that selects the destination path.
ret = GetDisk( TARGETDIR, ROOT)

Go to Project Assistant. Then click on the Application Files on the lower part on the tab. Add a new folder name to the Script Defined Folders. I named mine <ROOT> for this example.
Now in the Installation Designer, set the Destination property to the <ROOT> folder.
Make sure that in your script, you use the GetDisk(szPath, svDisk) function to define the varable ROOT before you move the data. Do this right after the user interface that selects the destination path.
ret = GetDisk( TARGETDIR, ROOT)