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

Problems installing vfpodbc.msi from IS6.11


6 replies to this topic

Merle

Merle
  • Members
  • 5 posts

Posted 31 March 2003 - 22:19

I'm trying to use LaunchAppAndWait in IS6.11 to install VFPODBC.MSI as follows:

szProgram = SRCDIR ^ "\\VFPODBC.msi";

nvResult = LaunchAppAndWait( szProgram, "", WAIT ) ;


This returns a -1 so obviously it is not working.  This works for installing MDAC.  What am I doing wrong here.  So far I know this fails with Win98 and XP.  Also I've verified that vfpodbc.msi exist at SRCDIR.  I've also tried running it from a known destination on the computer rather from the CD.  Nothing works.  What is the simplest way to install vfpodbc using IS 6.11.  Thanks in advance.

Merle



Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 01 April 2003 - 01:39

Yeah, MSIs are special little buggers, so check out the following post.

Should work for IS 6.11 too.
user posted image

Merle

Merle
  • Members
  • 5 posts

Posted 01 April 2003 - 20:43

Did I understand the answer to be that I must use msiexec.exe to install vfpodbc.msi?  If so I've tried this with LaunchAppAndWait, which seems to run the installer component but does not run vfpodbc.msi in turn.

svMsiPath = WINSYSDIR ^ "\\msiexec.exe";    
szProgram = "/i C:\\Program Files\\FabTrol Client\\VFPODBC.msi";
   
nvResult = LaunchAppAndWait ( svMsiPath , szProgram , WAIT );

This pops up a message "Incorrect command line parameters".
and returns a value of 0 to nvResult.  Then I placed a copy of vfpodbc into a folder named c:\test and tried following:

svMsiPath = WINSYSDIR ^ "\\msiexec.exe";    
szProgram = "/i C:\\Test\\VFPODBC.msi";
   
nvResult = LaunchAppAndWait ( svMsiPath , szProgram , WAIT );

Then I get this error:   "Error extracting supporting files"

What am I doing wrong here?  Ideally I'd like to be able install vpfodbc.msi from the CD (SRCDISK).  Could someone give me some sample lines of code so I can tell if I'm on the right track.   I appreciate any help here.  I'm relatively inexperienced with the more complex install issues.

Thanks again in adavance.

Merle

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 April 2003 - 08:32

Since your path to the msi file includes a blank, it must be surrounded with quotes:
Code Sample

szMsiExec = WINSYSDIR ^ "msiexec.exe";
szMsiFile = "C:\\Program Files\\FabTrol Client\\VFPODBC.msi";
LongPathToQuote(szMsiFile, TRUE);
nvResult = LaunchAppAndWait(szMsiExec, "/i " + szMsiFile, WAIT);

Remarks:
You shouldn't hard code the path to the .msi file.
You may want to check first if msiexec.exe exists on the target computer.

Merle

Merle
  • Members
  • 5 posts

Posted 03 April 2003 - 18:57

Ok, that works great and is cleaner than my approach.  Thank you very much for that.  Really appreciate the precise example.

Merle

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 07 April 2003 - 19:17

I know I'm jumping in here late, but I noticed that your paths seem to have a problem.

You state that you're using SRCDir^"\\program.exe"

You should be using SRCDIR^"program.exe"

I believe the extra slashes would also cause a problem for the OS's you discussed.  If I'm wrong about those slashes, though, someone let me know.
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

Merle

Merle
  • Members
  • 5 posts

Posted 07 April 2003 - 19:25

You are correct in that the extra slashes are not neccessary and I did remove them from my code.  However I did note that InstallShield apparently is smart enough to ignore them if they are left in.  I tried it both with and without the slashes. The value shown in the DeBug window is the same and shown correctly in each case.  Thanks for your input as it does validate that I was correct to remove them from my code as they are clearly unneccessary.

Merle