Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

7z SFX Modified Module and Tools

- - - - -

  • Please log in to reply
446 replies to this topic

#26
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag
It is possible to try so:
;!@Install@!UTF-8!
SetEnvironment="MP=\"%ProgramFiles%\\MyProg\""
RunProgram="hidcon:cmd /c setup.bat"
GUIMode="2"
;!@InstallEnd@!
And in setup.bat to make so:
@echo off
start /b /WAIT "" "%%T\setup.exe" /s
:_loop
IF EXIST "%ProgramFiles%\MyProg\filename" (
xcopy "%%T\patch.exe" "%MP%" /y
) ELSE ( 
goto :_loop
)
EXIT
Where filename substitute from installed applications.

Edited by gora, 17 August 2007 - 06:46 AM.



How to remove advertisement from MSFN

#27
Inferi0r

Inferi0r

    Little dude

  • Member
  • PipPip
  • 180 posts
off: the red-white-blue combination of flags is favo here :lol:

Hey Gora.

Thanks for you documentation on the 7z SFX site and your support here!
I see in the post above that you know everything ;) about a 'wait' in 7z SFX.

Now I have (and many people with me) the following problem. I use this parameters:
SetEnvironment="Var2=%ProgramFiles%\\Mozilla Firefox\\extensions\\*.xpi"
SetEnvironment="Var5=%ProgramFiles%\\Mozilla Firefox\\extensions"
RunProgram="hidcon:cmd FOR /f %%i IN ('DIR /b /a-d \"%Var2%\"') DO \"%Var1%\" -install-global-extension \"%Var5%\\%%i\""
There are are some (2 or more) *.xpi (can't know and use the exactly names of the xpi's).
The RunProgram could normally install every xpi which stored in the "ProgramFiles%\Mozilla Firefox\extensions" folder. But the problem is that there is not enough pause between each extension (xpi). So one or none extensions will be installed. The 'ping localhost methode' doesn't work at all...so do you know a solution?

Thanks in advance.

Edited by Inferi0r, 17 August 2007 - 08:00 AM.


#28
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag
I do not see in your code %Var1%!? What is it?
Designs FOR/f %% i IN (' DIR/b/a-d "%Var2 %" ') DO "%Var1 %"-instal-global-extension"%Var5 % \%%i" should work only in the presence of command SETLOCAL ENABLEEXTENSIONS. Where at you it?
Publish a configuration file completely.
If you execute some commands in cmd.exe, and they are connected among themselves by variables all of them should be located in one parametr RunProgram. Parametres and variables remain only within one session cmd.exe.
If some commands cannot be written in one line in cmd.exe use bath a file and start it from RunProgram

#29
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
TNX Gora ;)
coucou

#30
Inferi0r

Inferi0r

    Little dude

  • Member
  • PipPip
  • 180 posts
Sorry gora... i was thinking that it was better don't post unneeded information, but I make a fault.

;!@Install@!UTF-8!
; // Full silent install
GUIMode="2"
; // Set environments
SetEnvironment="Var1=%ProgramFiles%\\Mozilla Firefox\\firefox.exe"
SetEnvironment="Var2=%ProgramFiles%\\Mozilla Firefox\\extensions\\*.xpi"
SetEnvironment="Var3=%ProgramFiles%\\Mozilla Firefox\\chrome\\*fx*"
SetEnvironment="Var4=%AppData%\\Mozilla\\Firefox\\Profiles"
SetEnvironment="Var5=%ProgramFiles%\\Mozilla Firefox\\extensions"
SetEnvironment="Var6=%ProgramFiles%\\Mozilla Firefox\\chrome"
; // Silent install of Firefox
RunProgram="setup.exe -ms"
; // Set Firefox to default browser
RunProgram="\"%Var1%\" -setDefaultBrowser -silent"
; // Silent install of all extensions
RunProgram="hidcon:cmd FOR /f %%i IN ('DIR /b /a-d \"%Var2%\"') DO \"%Var1%\" -install-global-extension \"%Var5%\\%%i\""
; // Delete all packed extensions after install
Delete="%Var2%"
; // Set Adblock Plus settings if exist
RunProgram="hidcon:cmd IF EXIST patterns.ini FOR /f %%i IN ('DIR /b /a:d \"%Var4%\"') DO if exist \"localized\adblockplus\patterns.ini\" md \"%Var4%\\%%i\\adblockplus\""
RunProgram="hidcon:cmd IF EXIST patterns.ini FOR /f %%i IN ('DIR /b /a:d \"%Var4%\"') DO copy \"localized\adblockplus\patterns.ini\" \"%Var4%\\%%i\\adblockplus\""
; // Silent install of unsigned Themes (not needed and not set by default)
; RunProgram="hidcon:cmd FOR /f %%i IN ('DIR /b /a-d \"%Var3%\"') DO \"%Var1%\" -install-global-theme \"%Var6%\\%%i\""
; // Delete all packed themes after install
; Delete="%Var3%"
;!@InstallEnd@!


Set local extension? Never heard about that. I'll take a look into it.

Edit: I read here:

Command Extensions are enabled by default, DisableExtensions will attempt to disable Command extensions. (ENABLEEXTENSIONS - will attempt to re-enable)

So I don't understand why use SETLOCAL EnableExtensions, because I haven't disabled them.

Edited by Inferi0r, 17 August 2007 - 11:58 AM.


#31
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Inferi0r

So I don't understand why use SETLOCAL EnableExtensions, because I haven't disabled them.

Excuse, I was not right. :( Sorry...

But the problem is that there is not enough pause between each extension (xpi). So one or none extensions will be installed. The 'ping localhost methode' doesn't work at all...so do you know a solution?

In the module it is not provided what means for the organization of delays. But your problem in delay use in cmd.exe. You can use any known ways of the organization of a delay in .bat files. For example so:
RunProgram="hidcon:cmd FOR /f %%i IN ('DIR /b /a-d \"%Var2%\"') DO \"%Var1%\" -install-global-extension \"%Var5%\\%%i\" & echo *****"
Where * - code 07H (beep). :)
Or so:
RunProgram="hidcon:cmd FOR /f %%i IN ('DIR /b /a-d \"%Var2%\"') DO \"%Var1%\" -install-global-extension \"%Var5%\\%%i\" & nircmdc.exe wait 1000"
But it is necessary to add the freeware utility nircmdc.exe in archive. It is a lot of variants ;).

It will be possible to you better to unite all your commands in .bat file (the big flexibility since is not present necessity to unite some commands in one line) and then to start it from RunProgram, but.... To solve to you ;)

Successes to you.

Edited by gora, 17 August 2007 - 10:52 PM.


#32
Inferi0r

Inferi0r

    Little dude

  • Member
  • PipPip
  • 180 posts
Hey gora,

Thanks man for this helpful information.
I test this first then I report.

See You

#33
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • OS:none specified

The 'ping localhost methode' doesn't work at all...

For me it works perfect for both Firefox and Thunderbird. Adding '& ping localhost' sets a pause of 4 seconds in between each xpi installation and is exactly the same as using e.g. 'sleep.exe' or some other comparabel tool with a 4 second setting in between each xpi install, but just saves you the space off adding an extra tool to the SFX installer. I first tried with '& ping -n 1 localhost' and it didn't work. Then again with '& ping -n 2 localhost' and still not working. Then '& ping -n 3 localhost' and still nothing. Then finally with '& ping localhost' it worked and for both Firefox and Thunderbird('& ping -n 4 localhost' is the same as '& ping localhost'). I have made about 20 installs of Firefox and Thunderbird by now with '& ping localhost' and had success with every single installation.

Have you removed the 'Command-line tools' component with nLite without defining 'ping.exe' to be saved i.e. can you run 'ping localhost' from a command-prompt without getting an error message ?

Sorry for the off-topic'ness :blushing:

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#34
radix

radix

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 738 posts
  • OS:Windows 8 x64
  • Country: Country Flag
Hi Oleg!

I build a package with this config.txt:
 
;!@Install@!UTF-8!
RunProgram="hidcon:install.cmd"
GUIMode="2"
Shortcut="Du, {%%T\\%programfiles%\\DU Meter\\DUMeter.exe}, {}, {}, {}, {DU Meter}"
;!@InstallEnd@!


But, in icon properties on Target field appear this:
 
"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\7ZipSfx.000\%programfiles%\DU Meter\DUMeter.exe" 

Is posible to appear this:
 
"%programfiles%\DU Meter\DUMeter.exe" 

Or better this:
 
"C:\Program Files\DU Meter\DUMeter.exe" 

Thanks!

Edited by radix, 28 August 2007 - 04:13 PM.


#35
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hi, radix.
In a configuration file do not have parametre 'InstallPath'. In the Help it is written:

If the 'InstallPath' value is not present in the configuration file or the path was deleted from the interactive extraction dialog, the archive will be extracted to a temporary folder.

and

%%T - full extraction path


Therefore the module also adds to you a way to a temporary folder. At you should be so:
Shortcut = "Du, {C:\\Program Files\\DU Meter\\DUMeter.exe}, {}, {}, {}, {DU Meter}"

Edited by gora, 30 August 2007 - 06:08 AM.


#36
radix

radix

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 738 posts
  • OS:Windows 8 x64
  • Country: Country Flag
Hi!
I use a config.txt file like this:

;!@Install@!UTF-8!
RunProgram="setup.exe"
GUIMode="2"
;!@InstallEnd@!

The temporary folder where the sfx archive is extracted is not deleted after
the installation of the program.
Is this correct?

#37
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hi, radix.

Is this correct?

YES. All depends on your file setup.exe. If his process does not branch, the temporary folder should remove.
If the file setup.exe starts child process and closes the basic, the module tries to remove a temporary folder, but child process can continue to use files from a temporary folder and does not allow to remove it.

#38
radix

radix

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 738 posts
  • OS:Windows 8 x64
  • Country: Country Flag
Thx Gora!
Anyway I use CCleaner frequently to empty the TempDir.

#39
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
I released new version of the module. It's based on 7-Zip 4.57 sources.
Only updated modules are available now. I hope to finish working on the web site, help files and other stuff by the end of the next week. That's why only the direct links to the files are available at this point. You'll find them below:
7zSD build 861
7zSD_extra build 861

Edited by Oleg_Sch, 08 December 2007 - 07:51 PM.


#40
dll32

dll32

    Newbie

  • Member
  • 23 posts
I got a problem with the icon of the exe when the size of the archive is bigger than ~700mb.
The problem is that the icon gets replaced to the boring "white rectangle".

Is this a bug with 7zSD?
If it's a known bug, is there any way to prevent it?

#41
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
dll32
Some questions:
Are you changing icon in module? If "yes" - what program you use for that ?
Are you compress module by UPX or other programs?
I.e., give me full details...
I will try to repeat the situation and provide a more precise answer.

#42
dll32

dll32

    Newbie

  • Member
  • 23 posts
I'm not changing the icon of the module, or using any kind of compression except for 7-zip.

I got a question now to:
is it possible to specify two archives when creating the exe?
eg.
copy /b 7zs.sfx + config.txt + archive1.7z + archive2.7z (Installer_Name).exe

#43
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts

is it possible to specify two archives when creating the exe?
eg.
copy /b 7zs.sfx + config.txt + archive1.7z + archive2.7z (Installer_Name).exe

No. It's not! Only ONE archive can be active/used in one time. (in your example this is the archive1.7z, i.e. first)
I think it is better to go to the PM about icon's problems.
When we will decide our problems, we will inform all...

#44
heffalump

heffalump

    Junior

  • Member
  • Pip
  • 83 posts
Would be nice if someone made a little GUI so no need to manually write text files and use command prompt. Like winrar SFX window ;)

#45
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
To heffalump:

To do:
GUI (but it's been todo for quite some time )
Feel free to develop GUI, but make sure it can be easily localized to other languages.

Sorry, not enough time to do this :(

#46
gora

gora

    Member

  • Member
  • PipPip
  • 146 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Would be nice if someone made a little GUI so no need to manually write text files and use command prompt. Like winrar SFX window ;)

GUI for write config file (interface Russian only)
Creation of a config file Online service (interface Russian only)
Creation 7z SFX archives in Total Commander (interface Russian and English, Help - Russian only)

All on the basis of modified module Oleg_Sch

Edited by gora, 15 October 2008 - 01:04 PM.


#47
Jolli

Jolli

    Newbie

  • Member
  • 35 posts
  • OS:XP Pro x86
  • Country: Country Flag
Hi there :hello:

There is an other Guy (Georg Wittberger) who mod the SFX modules, with a really "eye-candy" user interface. :thumbup

So, if both can combine together, it would be perfect!
Is this possible?

Regards.

Georg Wittberger Homepage

Attached File  Professional_GUI.jpg   36.22KB   8 downloads

This projects aimes at improving the look and feel of 7-Zip's SFX modules. 

Currently there are two types of customized SFX modules: a simple basic module for general purposes and 
a professional-looking advanced module with a modern installer look and feel. All these modules are based 
on the original SFX modules so they do not provide any extra functionality.

The main advantages of these customized SFX modules are the consistent look of the start dialog and 
the extraction dialog, the support of Windows XP visual styles and additional graphics and 
texts to tell unexperienced users what to do with the SFX archive.


#48
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts

I got a problem with the icon of the exe when the size of the archive is bigger than ~700mb.
The problem is that the icon gets replaced to the boring "white rectangle".

Is this a bug with 7zSD?
If it's a known bug, is there any way to prevent it?

I made some experiments and found that it is not a bug of the module.
I found a description of such problems for Inno Setup. Read this
I do not know how to solve this problem

#49
dll32

dll32

    Newbie

  • Member
  • 23 posts

I got a problem with the icon of the exe when the size of the archive is bigger than ~700mb.
The problem is that the icon gets replaced to the boring "white rectangle".

Is this a bug with 7zSD?
If it's a known bug, is there any way to prevent it?

I made some experiments and found that it is not a bug of the module.
I found a description of such problems for Inno Setup. Read this
I do not know how to solve this problem


Thanks for the clarification and thanks for trying, now I at least know what's causing it.

By the way...
I just got an idea, i might just put the installer within another installer, that extract the installer silently and then executes it.

// dLL32

#50
LLL

LLL
  • Member
  • 1 posts
Hy,

Your module is under GNU LGPL but i don't find the sources code on the douwload page. Can you give me the link please ?

THANKS




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN