chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Unzip 7zip while installing

Hi
I need to unzip .7zip while installing the installer(.exe) created with the help of Advanced installer . Please help me with this as i am unable to find any solution.
chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Re: Unzip 7zip while installing

And Adding to that ..is it possible to insert the relative paths in the files while installing the exe .
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unzip 7zip while installing

Hello and welcome to Advanced Installer forums,

I'm not sure I fully understand your scenario. Can you please give us more details, maybe exemplify?

Do you need to deploy 7zip among with your application? If Yes, then you can add the 7zip installation package as a prerequisite in the Prererequisites page.
Please take a look on the Add prerequisite article with related information for hints and guidance.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Re: Unzip 7zip while installing

Hi Den, Thanks for reply
scenario is this:-
I am trying to create an exe with
i am trying to use some 7zip files like (file1.7z,file2.7z....file10.7z) in different folders and sub-folders. As Per my requirement i need to pick these .7zip files extract them in their respective locations and also edit (Search & replace) the files within that extracted folders(from file1.7z) .
i am using a command line version of 7zip (7za.exe) to extract the .7zip files.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unzip 7zip while installing

Hello,

I assume you want to use .zip archive to reduce the size of the installation package, right?

Please note that you can reduce the size of your installation package using the LZMA compression for installers. For this, you can select the LZMA compression in the Builds page -> Configuration tab. The main advantage of LZMA compression is that it generates a smaller package size than CAB archiving.

You can select the appropriate LZMA method from the LZMA options.

Let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Re: Unzip 7zip while installing

Hi den
Thanks for prompt reply .. I will use LZMA compression from now.
Please help me with replacing the text in files while installing the exe created by advanced installer.
for example :-
file name where text needed to be replaced - application start.bat
I need to search text or string "D:/Application_Name/Folder/Sub-folder/conf.properties" and replace it with "installed_directory/Application_Name/Folder/Sub-folder/conf.properties"

I need to perform this action in files(.html,.bat,.XML) across my application .

Please guide through this.
Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unzip 7zip while installing

Hello,

In order to update a file which is part of the installation package you can consider our Text File Update support which can be used to either create a new file with the specified content or to modify those existing using "Append" and "Search & Replace" operations.

The APPDIR property contains the value of the installation path selected by the user during installation; so you can use this property in the Replace section from the Replace Operation.

You can also take a look on the Writable App folder possible? forum thread which debates a similar subject.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Re: Unzip 7zip while installing

Hi Den,
I tried that "text file Update" but it seems it didn't worked .do i need to create file like this for the al;l files or one txt file can replace all. And also i have some other kind of files like .bat,.xml and all . Please help .
Please refer attachment.
Attachments
Adv.PNG
Adv.PNG (11.18 KiB) Viewed 15154 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unzip 7zip while installing

Hello,

Indeed, you need to create a text file update operation for each file from the installation package that you want to update. Also, you need to rename the text file update as the file that you want to be updated.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
chandrabhushan
Posts: 76
Joined: Thu Jul 02, 2015 10:58 am

Re: Unzip 7zip while installing

Hi Den,
In My Set-up I have thousands of files (.txt,.bat..XML,INI) and for most of them I need to insert installation path (edit those files) .And that is the most impotent part of my installation . It's not possible for me to do it (create a replace file) in the last suggested way .
Please Suggest/Guide me for some other way. I/We purchased the Enterprise license.
Please explain me in detail how and what to do.
Thanks again
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Unzip 7zip while installing

Hello,

When adding an INI file or an XML file to your package you have two options:
  • import it as a regular file (the file is treated like a normal file)
  • import it in Windows Installer format
If they are added in Windows Installer format, you don't have to use a text file update operation for .XML and .INI files. You can use the XML editor or INI editor to insert installer properties (e.g. [APPDIR]) instead of hard-coded values. These properties can be set dynamically during install. Please take a look on the How do I import and edit an XML file? article which may be useful to you.

For the .txt and .bat files, you need to create a text file update operation to update each file.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MrBrendan
Posts: 6
Joined: Tue Mar 17, 2015 9:49 pm

Re: Unzip 7zip while installing

Just a side not for anyone coming across this thread, as mentioned before using the built-in compression is always best. However if you must include a 7zip file, your destination system must have the path of 7z.exe executable. You can do a system search for it and store it in a property, or set it via your installer during install time.

7 zip doesn't work on destination machines out of the box, because when you install it, it doesn't put the path to 7z.exe in the SYSTEM PATH.

Return to “Building Installers”