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

Extract file from .cab


3 replies to this topic

cft

cft
  • Members
  • 2 posts

Posted 11 January 2005 - 14:57

Hello,
I need to extracted a file from a .cab with InstallScript.
The cab is external from the project.
Thank you.

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 11 January 2005 - 15:14

You can use the Micro$oft Cabarc.exe program to extract files from standard cabinet files. Go to the Micro$oft site and search 'cabarc'. You can download the programs from there also. You need to place the program Cabarc.exe in your SUPPORTDIR and run it using LaunchAppAndWait().

This example extracts all .exe all .dll and the file upinfo.cfg from the cabinet file in svDataPath and places them in the folder TARGETDIR ^ "\\JWSUpgrd\\".

CODE
ret = LaunchAppAndWait( SUPPORTDIR ^ "cabarc.exe" , " -o x " + svDataPath + " *.exe *.dll upinfo.cfg " + TARGETDIR^ "\\JWSUpgrd\\"  , LAAW_OPTION_SHOW_HOURGLASS| LAAW_OPTION_MINIMIZED| LAAW_OPTION_HIDDEN| LAAW_OPTION_WAIT);


cft

cft
  • Members
  • 2 posts

Posted 11 January 2005 - 17:44

Thank you for your answer.

I use DevStudio 8.0 and i don't find the options LAAW_OPTION_SHOW_HOURGLASS| LAAW_OPTION_MINIMIZED| LAAW_OPTION_HIDDEN| LAAW_OPTION_WAIT.
I have only WAIT. It works fine, but a DOS windows is showed. It's not very beautiful.
Do you have a solution to hide the DOS windows ?

ThankYou

Ozone

Ozone
  • Full Members
  • 77 posts

Posted 11 January 2005 - 20:17

We jumped from InstallShield 6.12 to DevStudio 9, so I am not familiar with ver 8.
In IS 6.12 the comments section of the help for LaunchApp() & LaunchAppAndWait() states;

LaunchAppAndWait launches DOS programs with a full screen DOS window. To launch a DOS program with a different type of window, you must call Windows APIs directly.

You can also use the FindWindow and SendMessage functions to control or send messages to the launched application. If you want to run a DOS application in a Window, you can provide a PIF (Program Information File) with the same name as the DOS application. In the PIF file you specify a windowed mode for the application to run under.

I think that the PIF file method would be easier, while the API method would be ‘cleaner’. Sorry I don’t recall which API is involved.