Jump to content

7z SFX Modified Module and Tools


Recommended Posts

2 Oleg_Sch,

I am using version of the modified module on XP SP3 x86.

I created a config.txt with Language Sections.

By chance, there were syntax errors in the Language Sections, but the Main Section was without any syntax errors.

After I made the SFX with this config.txt, I tested it by running the SFX with the language switch -sfxlang:nnnn.

The software was installed but the language section was NOT run. There were NO error messages.

Usually, if the main section has syntax errors there is an error message giving the line number where the syntax error is located.

After I corrected the syntax error in the config.txt and rebuilt the SFX. I tested again with the language switch and the result was that the software was installed and the language section WAS run.

So, I think this would be a bug. Shouldn't the module give a similar error message for syntax errors in the language sections of the config.txt?

Otherwise it appears as if the installation is complete, including the language section parameters.

Thanks again, for a very useful tool.

Link to comment
Share on other sites

2 visegrip

1 Show your config file (with errors)

2 Give the step by step instructions to reproduce the bug.

First, I am sorry but my description of the issue in my previous post is not correct.

So, ignore my previous post completely.

After more testing, this particular syntax error is not detected by the module at all.

It doesn't matter if it is in the main section or a language section of the config.txt.

I am sorry if this is a previously known limitation of the module.

Therefore, I have reduced the config.txt to:

Title="PhotoScape v.3.6.2"
SetEnvironment="add_reg=rundll32.exe advpack.dll,LaunchINFSection PhotoScapeReg.inf,DefaultInstall,3,N"
SetEnvironment="add_files=hidcon:xcopy %app_name% \"%app_path%\" /s /e /i /y"
RunProgram="hidcon:cmd /c copy Lang\\ar\\lang_3_6.txt\" \"%app_path%\" /y"
Shortcut="26,{%app_path%\\%app_name%.exe},{},{Microsoft\\Internet Explorer\\Quick Launch},{},{%app_name%}"

The syntax error is on line 11. There is \" after lang_3_6.txt (which should not be there.)

This mistake causes line 11 to fail however no error message is ever given by module.

So, apparently the module is not capable of detecting this type of syntax error. ("hanging": \")

Perhaps it could be added to the detection method of the module?

Link to comment
Share on other sites

2 visegrip

It's not a bug!


RunProgram="cmd /k Echo Print one double quote \" "
RunProgram="cmd /k Echo Print two double quotes \" \" "
RunProgram="cmd /k Echo Print three double quotes \" \" \" "

Another example:

SetEnvironment="prnt=cmd /k Echo Print path \"%programfiles%\\"
RunProgram="%prnt%Adobe\\Reader 10.0\""

All the lines are correct!

Edited by gora
Link to comment
Share on other sites


I understand both your examples.

Thanks for those.

So, to allow the possibility of your examples, my example is not detected as a syntax error by the module?

Or to say it another way, if line 11 in my example is not a syntax error according to the module--what should be the expected result of line 11?

Link to comment
Share on other sites

The module checks syntax of a design:


In "value_parameter" there should not be double quotes without a slash.

The module doesn't check even/odd number of double quotes with slashes in "value_parameter".

The rest in "value_parameter" the user should supervise all.

The module can't replace a brain of the user! :no:

Link to comment
Share on other sites

In "value_parameter" there should not be double quotes without a slash.

The module doesn't check even/odd number of double quotes with slashes in "value_parameter"...

This explains everything.

I guess I was expecting too much after receiving syntax error messages in the past which helped me to correct mistakes I had made.

I guess syntax highlighting for \" would be nice in the text editor.

Thanks again, gora. You have helped me to understand the working of the module a bit better.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

2 Oleg_Sch or gora,


What is the command line to add two languages in a 7zSFX with many language sections?

I have tried:

7zSFX.exe -sfxlang:nnnn:mmmm

7zSFX.exe -sfxlang:nnnn+mmmm

7zSFX.exe -sfxlang:nnnn;mmmm

7zSFX.exe -sfxlang:nnnn,mmmm

Is it possible?

Next Question,

I'm having problems with:

\"%^PROGRAMFILES%\\Some Software Name\"

I want:

%PROGRAMFILES%\Some Software Name

I don't want:

C:\Program File\Some Software Name

What I am getting:

%^PROGRAMFILES%\Some Software Name


I am trying to add a Type REG_EXPAND_SZ value to the registry.

How do I get the string name returned instead of the string value for %PROGRAMFILES% ?


Edited by visegrip
Link to comment
Share on other sites

1 No. It is impossible. Syntax of a key:


The key of sfxlang can be only one in CL

2 Export your key to the.reg file and bring him here. I convert it to a line of a config

Edited by gora
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...