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

Running exe's from from disk


4 replies to this topic

Erica Ewing

Erica Ewing
  • Members
  • 2 posts

Posted 06 May 2002 - 22:16

I am attempting to Launch an exe's from disk.  If I use LaunchAppandWait with SRCDIR it doesn't work.  The SRCDIR points to a temp directory where the .inx file is (as noted in the documentation).

I would like to get the path from where setup.exe is launched so I can pass it to LaunchAppandWait and run an exe from disk. I tested many environment variables and I am not able to get the path.  Have any suggestions?

Thanks,
Erica

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 07 May 2002 - 00:45

I remeber someone asking this same question on the old forum site, but I don't recall the answer. =(

In any case, SRCDIR definitely isn't gonna get you what you want.  Have you tried SRCDISK?

It shouldn't come to this, but worst case, you could put that other EXE in your IS project, so it's available from that SRCDIR location.  For example, you would throw it in the following directory:
<Install Project>\Setup Files\Compressed Files\Language Independent\OS Independent

Then, from your script, you would use the following call:
LaunchAppAndWait(SUPPORTDIR ^ "filename.exe", WAIT);

Hope it helps.
user posted image

BobT

BobT
  • Members
  • 24 posts

Posted 07 May 2002 - 13:23

I have used SRCDIR in the way you are attempting and it works for my installs.  I place my files a folder in the Disk 1 folder of the Uncompressed Setup files and then call it using LaunchAppAndWait with SRCDIR.  My understanding is that SUPPORTDIR is the path to the temporary folder IS uses.  You might want to put a message box in your script showing the value of SRCDIR at the point you use LaunchAppAndWait to see what the value is at that point.  According to IS you can change the value of SRCDIR but not SUPPORTDIR.

BobT

Erica Ewing

Erica Ewing
  • Members
  • 2 posts

Posted 08 May 2002 - 02:56

Thanks to both of you!

TacoBell00 - I tried SRCDISK and that didn't work either.  Ya, I thought about the worse case scenario and putting in the SRCDIR location, but I I wanted to avoid that.  So, instead I am doing the check via c++ before I launch install shield.  I still would like to check it via Install Shield! :(

BobT - Ya, I added a dialogue box to print out the value of SCRDIR during run time and it points to some temp location where the .inx file lives.  Yes, you can change the value of SCRDIR but I still can't get the path anyhow.  

Well thank you, but for now I will just use the work around via C++.

Erica

Huub Hezemans

Huub Hezemans
  • Members
  • 2 posts

Posted 10 May 2002 - 09:04

To launch exe's from the setup media I use the SRCDISK constant and add the predefined path to it.
sDir = SRCDISK ^ "Extra"
sPath = sDir ^ "winmine.exe"
I don't wont to include the extra map in my setup project so i simply add it to the media before distribution.
I use a special API call (see winsite.org) to launch the program but i also used LaunchApp(AndWait) and it works fine for me.
Did you think of LongPathToQuote and perhaps ChangeDirectory?