/build/static/layout/Breadcrumb_cap_w.png

How can i extract a .zip file using Install Shiwld 2012

I have got a .zip folder which if i extract in the pC ehre i am packaging would take it's properties. So i need to place that .zip under C:\install and then extract it from there. How can i do it using install shield

 


0 Comments   [ + ] Show comments

Answers (2)

Posted by: jagadeish 10 years ago
Red Belt
2

You can use the below vbscript in custom action

 

Option Explicit

Extract "<SourceLocation>\MySource.zip", "<DestinationFolder>\"

 

 

Sub Extract( ByVal myZipFile, ByVal myTargetDir )

Dim intOptions, objShell, objSource, objTarget

Set objShell = CreateObject( "Shell.Application" )

Set objSource = objShell.NameSpace( myZipFile ).Items( )

Set objTarget = objShell.NameSpace( myTargetDir )

intOptions = 20

objTarget.CopyHere objSource, intOptions

Set objSource = Nothing

Set objTarget = Nothing

Set objShell  = Nothing

End Sub

 

Comments:
  • Thanks!!!
    But i was thinking if there i a way in which without a custom action this an be done. - harshbabera 10 years ago
Posted by: vjaneczko 10 years ago
9th Degree Black Belt
0

The answer is; you can't.  InstallShield can control the properties of the files, so you can extract them from the ZIP file, add them to your MSI, and set the file properties.

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ