• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Oleg_Sch

7z SFX Modified Module and Tools

511 posts in this topic

Read here, please

Bonus :)

Edited by gora
0

Share this post


Link to post
Share on other sites

2 Oleg_Sch or gora,

Question:

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

Purpose:

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% ?

Thanks.

Edited by visegrip
0

Share this post


Link to post
Share on other sites

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

-sfxlang:xxxx

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
0

Share this post


Link to post
Share on other sites

gora,

OK, thanks.

I will continue working on 2, and if I can't solve it, I will post a sample reg entry here.

0

Share this post


Link to post
Share on other sites

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

gora,

From command prompt run something like this:

reg add "HKCU\SOFTWARE\Some Software Name" /v Location /t REG_EXPAND_SZ /d "%%SYSTEMDRIVE%%\Program Files\Some Software Name" /f

Look at the resulting entry in the registry.

I want the same result when run from the config.txt.

The CHM manual says to get the variable name instead of its value use:

%^SYSTEMDRIVE%

But I can't get the correct syntax yet.

0

Share this post


Link to post
Share on other sites

The CHM manual says to get the variable name instead of its value use:

%^SYSTEMDRIVE%

You do not carefully read the manual
Если в текстовых параметрах необходимо указать имя переменной, а не ее значение, то переменную нужно записать следующим образом:

%^PROGRAMFILES%

You see how bad that is not English manual! ;)

But I can't get the correct syntax yet.

A very severe case...

SetEnvironment="Var=%%^SYSTEMDRIVE%%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

0

Share this post


Link to post
Share on other sites

Wow, thanks gora--I would not have got that.

Seems like I must read the manual more carefully.

Now I see one reason you often include a batch or cmd file in many of your releases.

0

Share this post


Link to post
Share on other sites

for 7zsd

create a folder and context menu with batch file for create sfx module

http://www.axifile.com/en/D101DE0571 or

http://rapidgator.net/file/23278624/7zsfx_windows_XP_Vista_win7-new.exe.html

in this packet sfx container module 7zsd with resources hacker and cmenu and extraico

extract automatic in %programfiles%\7zsfx

into folder 7zsfx file .bat

with cmenu create context menu for .bat file

file bat compress folder in .7z and create file configsfx.txt for 7zsfx

open file configsfx.txt during process for modifier file when closing continue process

and create sfx with name folder and lunch file.exe

with extraico estract ico file from .exe and with reshacker change ico in the file sfx

problem cmenu dont work in win 7

don't create menu context for this utility

Edited by odar
0

Share this post


Link to post
Share on other sites

SetEnvironment="Var=%%^SYSTEMDRIVE%%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

Interesting...

On my system I had to use:

SetEnvironment="Var=%^SYSTEMDRIVE%"

instead of:

SetEnvironment="Var=%%^SYSTEMDRIVE%%"

for it to work correctly.

0

Share this post


Link to post
Share on other sites

1 What is your system?

2 Shows two lines, rather than one, please.

0

Share this post


Link to post
Share on other sites

1. XP SP3 x86

2.

SetEnvironment="Var=%^SYSTEMDRIVE%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

Result for data in that registry key:

%SYSTEMDRIVE%\Program Files\Some Software Name

If I use your two lines, I get this for data:

%%SYSTEMDRIVE%%\Program Files\Some Software Name

which seems odd.

I hope that helps. Let me know if you need any more information.

0

Share this post


Link to post
Share on other sites

2 visegrip

Yes. It's my fault. I did the code to add this variable in the double signs %

You have finished it and now it's your code. Congratulations! :)

Simpler variant:

RunProgram="hidcon:Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"\"%\"SYSTEMDRIVE\"%\"\\Program Files\\Some Software Name\" /f"

Edited by gora
0

Share this post


Link to post
Share on other sites

I was wondering, we have to use a backslash when using " so it becomes \" in the config file.

But what about the single quote? Is the backslash needed also?

Example:

'

becomes

\'

I have this problem with the malwarebytes silent installer that uses a ' in the name.

0

Share this post


Link to post
Share on other sites

The symbol ' does not require screening by symbol \

0

Share this post


Link to post
Share on other sites

I'm trying to create a silent installer for my Windows 7 theme, here's my Config.txt


;!@Install@!UTF-8!
GUIMode="2"
Path="%Windir%\Resources\Themes\"
Progress="No"
RunProgram="InstallUxStyle.cmd"
;!@InstallEnd@!

and here's my install script.


@ECHO OFF
GOTO DETECT

:INSTALL


:DETECT
%PROCESSOR_ARCHITECTURE%
IF AMD64 GOTO AMD64
IF x86 GOTO x86
IF IA64 GOTO IA64

:AMD64
Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex64.msi" /j m
GOTO END

:x86
Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex86.msi" /j m
GOTO END

:IA64
Sorry, your architecture isn't supported.
GOTO END

:END
Del "%Windir%\Resources\Themes\Cloud7\UxStyle\"
Exit

I'm on Win8 atm because my win7 partition died, is this correct, and more importantly, how do I make this actually execute the scripts and programs and everything?

0

Share this post


Link to post
Share on other sites

Why use a CMD when you can use the SFX to install and detect what arch to use

 ;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%Windir%\\Resources\\Themes"
RunProgram="x64:%%T\\Cloud7\\UxStyle\\UxStylex64.msi [switches_here]"
RunProgram="x86:%%T\\Cloud7\\UxStyle\\UxStylex86.msi [switches_here]"
Delete="%%T\\Cloud7\\UxStyle"
;!@InstallEnd@!

Note: you dont need Progress=No with GUIMode=2 and you have to use two backslashes (\\) in the path(s)

Also:

x86: will only execute on 32bit

x64: will only execute on 64bit

%%T variable is equal to the InstallPath

Edited by ricktendo64
0

Share this post


Link to post
Share on other sites

So a little shorter:


;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%Windir%\\Resources\\Themes"
RunProgram="%%P:Cloud7\\UxStyle\\UxStyle%%P.msi [switches_here]"
Delete="%%T\\Cloud7\\UxStyle"
;!@InstallEnd@!

If you need the full path for the MSI, then this:


...
RunProgram="%%P:\"%%T\\Cloud7\\UxStyle\\UxStyle%%P.msi\" [switches_here]"
...

0

Share this post


Link to post
Share on other sites

Hello... I have a problem with %appdata% variable...

I need extract test.txt file to %appdata%\Local\Test folder, but file is extract to %appdata%\Roaming\Local\Test How I avoid this problem...?

My config file:

;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%appdata%\\Local\\Test"
;!@InstallEnd@!

I not want use complete path to extract file, because I want to use for different users...

Thanks and regards... ;-)

0

Share this post


Link to post
Share on other sites

On my OS (win 7 x64) %appdata% = C:\Users\gora\AppData\Roaming

You do not?

0

Share this post


Link to post
Share on other sites

On my OS (win 7 x64) %appdata% = C:\Users\gora\AppData\Roaming

You do not?

Yes, but in Appdata folder there are 3 folders: Local, LocalLow and Roaming... %appdata% variable points directly to Appdata\Roaming and I want extract file to Appdata\Local...

Thanks for your fast reply...

post-329917-0-34084600-1346940433_thumb.

Edited by alfreire
0

Share this post


Link to post
Share on other sites

I want extract file to Appdata\Local...

7zSfxFolder28=C:\Users\gora\AppData\Local

;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%7zSfxFolder28%\\Test"
;!@InstallEnd@!

0

Share this post


Link to post
Share on other sites

I think I found a solution...

;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%USERPROFILE%\\AppData\\Local\\Test"
;!@InstallEnd@!

What do you think...?

0

Share this post


Link to post
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.