PDA

View Full Version : Determine the directory/path



patrickmce
08-25-2010, 05:05 PM
Can installshield determine the directory/path where an application is loaded FROM and create a shortcut back to a file or files in the Installed From directory.



For example – Say I run a setup.exe from a CD/DVD drive and this setup installs an application to my C drive --- However, this program needs to open data which resides on the DVD and needs a shortcut back to that data.



Since we can’t assume that the DVD will have been loaded from a D, E, F drive, etc. – is there a way to grab that information at runtime and add it to the file path.



So – the program will have been loaded to --- C:\Program Files\MyProgram

but the Shortcut would be to <DVD Drive Letter>:\DataFile\data.nfo



Is there a command to dynamically grab that DVD Drive Letter, or maybe another way to do this?



Thanks!

hidenori
08-26-2010, 01:58 PM
Try using the SourceDir property (http://msdn.microsoft.com/en-us/library/aa371857(v=VS.85).aspx) (i.e. [SourceDir]DataFile\data.nfo) and see if you can accomplish your requirement.