Jump to content


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.
Photo

SRCDISK - what is it..


7 replies to this topic

Yehuda

Yehuda
  • Full Members
  • 52 posts

Posted 06 June 2002 - 08:02

The next code returns the next result:

MessageBox( SRCDISK, INFORMATION );
"C:"

(it occurs also when packaged exe runs from disk A: or D:; the disk C: is the system disk on my machine).

The IS Help (SRCDISK article):
...This system variable contains the name of the drive with the source disk.
During setup initialization, InstallShield assigns to SRCDISK the name of
the drive that holds the disk containing the setup script file, Setup.ins.
For example, if you start Setup.exe from a floppy disk in the A drive, then
if that disk contains the file Setup.ins, InstallShield assigns the value
"A:" to SRCDISK...

How can I get the realy source path of the distribution media, the Setup.exe runs from?
Please, help...
Yehuda

EberhardH

EberhardH
  • Members
  • 137 posts

Posted 06 June 2002 - 11:47

Hi,

am I right that you don't want to know the source disk but the source path, instead?

Use the variable SRCDIR.
IS Help says: "This system variable contains the fully qualified path to the source folder that contains the compiled setup script. During setup initialization, InstallShield assigns to SRCDIR the fully qualified path to the folder in which your .inx file is located."

SRCDIR contains exactly the full qualified path to the directory of your media where are files like setup.exe, setup.ins, ...

Eberhard

Yehuda

Yehuda
  • Full Members
  • 52 posts

Posted 06 June 2002 - 14:23

Thank you for the replay. Unfortunately it is not the solving.
The next code returns:

MessageBox( SRCDIR, INFORMATION );
"C:\DOCUME~1\yehudak\LOCALS~1\Temp\pft5CB~tmp\Disk1\"

It is fully according to documentation:
Help of InstallShield, SRCDIR article:
...InstallShield assigns to SRCDIR the fully qualified path to the folder in which your .inx file is located... (which Setup.exe is unpackaged into, i.e., temp directory...).

But I am truly need the path to the place the Setup.exe is executed from to get from the path (from the CD, for example) other files, that cannot be included to the setup project.

I will gratefull for help.
Yehuda.



Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 06 June 2002 - 20:05

This is a semi-FAQ, but I've never seen a way to directly do this in IS.  If you do, please let me know.

FYI, here's the most recent post on the subject.
user posted image

EberhardH

EberhardH
  • Members
  • 137 posts

Posted 07 June 2002 - 07:39

Ehm,

with the following lines
Code Sample
MessageBox("SRCDISK = " + SRCDISK, INFORMATION);
MessageBox("SRCDIR=" + SRCDIR, INFORMATION);


I get this:
     SRCDISK = P:
     SRCDIR = P:\IS_Proj\Test\Media\TestCD\Disk1\
which is exactly the location the Setup.exe was started from (a network drive, in this case).

I just wrote my setup on a CD, and now setup reports this:
     SRCDISK = D:
     SRCDIR = D:\
which es true as well because there is no subdirectory on the CD, and Setup.exe is directly in the root directory.

And nothing with drive C: where Windows does reside! What else do you need? What's wrong with my IS that it reports the correct location? Did you happen to touch SRCDIR before (debugger will tell)?

Eberhard

BobT

BobT
  • Members
  • 24 posts

Posted 07 June 2002 - 12:47

I too have used SRCDISK with the expected results if I do not have my install in a self-extracting exe.  When I do that, I find that SRCDISK gives the results that Yehuda is getting.  Are you using a self-extracting exe?  I was never able to get SRCDISK to give the source drive when using that option.

BobT

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 08 June 2002 - 01:30

Humm, I stand corrected then EberhardH.  I suggested in that post I mention that they make use of SRCDISK since, according to the help, it sounded like it would work, but I've never tried it myself.

I can also see how a packaged EXE can throw that off though 'cause it's telling the truth.  In such case, you actually want the source's source.


user posted image

Yehuda

Yehuda
  • Full Members
  • 52 posts

Posted 09 June 2002 - 09:05

Thanks for all replays.

1) to Eberhard.
I am using packaged exe. It is forcing.
The searching of all disks of this computer will not help, because the setup may to run from the network (as LAN...).

2) to TacoBell00.
I saw the most recent post, but it retained without solution.
I also discribed my problem previously, but, may be, it was too detailed.

I will grateful for any help.


Yehuda