• 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

Modules and only download page of the site were updated. Other pages and offline help file still outdated.

1.4.1.2100-stable and 1.5.0.2100-beta can be found on download page

Edited by Oleg_Sch
0

Share this post


Link to post
Share on other sites

Hi,

Anyone can help me adding the follwoing commands into my config.txt?

attrib -R "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\Settings.ini" /S /D
COPY /Y "%~dp0Settings.ini" "%userprofile%\AppData\Local\Microsoft\Windows Sidebar\"
SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
REG ADD %KEY%\001 /V 1 /D "%systemdrive%\Program Files\Windows Sidebar\sidebar.exe" /f

I'll apprciate yr help

Regards

0

Share this post


Link to post
Share on other sites
SetEnvironment="KEY=HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce"
RunProgram="hidcon:attrib -R \"%userprofile%\\AppData\\Local\\Microsoft\\Windows Sidebar\\Settings.ini\" /S /D"
RunProgram="hidcon:cmd /c COPY /Y Settings.ini \"%userprofile%\\AppData\\Local\\Microsoft\\Windows Sidebar\\\""
RunProgram="hidcon:cmd /c REG ADD %KEY%\\001 /V 1 /D \"%systemdrive%\\Program Files\\Windows Sidebar\\sidebar.exe\" /f"

File Settings.ini should be at the root of the archive

0

Share this post


Link to post
Share on other sites

having issues with the 7zsd_All.sfx module everytime it extracts it extracts to a temp folder not the folder i specify and then it tries running setup.exe which i dont have as im using the archive to run a batch file to help with an uninstaller im making that uses a mix of batch vbs and hta to allow option selection then run based on options chosen any idea's on how to do this?

0

Share this post


Link to post
Share on other sites

having issues with the 7zsd_All.sfx module everytime it extracts it extracts to a temp folder not the folder i specify and then it tries running setup.exe which i dont have as im using the archive to run a batch file to help with an uninstaller im making that uses a mix of batch vbs and hta to allow option selection then run based on options chosen any idea's on how to do this?

Post your config.txt and make sure not to use a SFX that you split using 7zsplit because it will retain the previous config.txt

0

Share this post


Link to post
Share on other sites

this is my config file its pretty simple

;!@Install@!UTF-8!

GUIMode="1"

Skip="yes"

path="sounds"

;!@InstallEnd@!

im using the 7zsd_All.sfx modual from the 1.5 beta iv also tried with like 5 other modules and getting to my wits end

all i want it to do is so the extraction then run a vbs or batch file(depending on if i use the hide option from the module)

(note i forgot the run command in the config file because i was testing without it)

0

Share this post


Link to post
Share on other sites
;!@Install@!UTF-8!

GUIMode="1"

Skip="yes"

path="sounds"

;!@InstallEnd@!

Where did you find these parameters?

These parameters does not exist!

(note i forgot the run command in the config file because i was testing without it)

Can not be tested without the run command!

0

Share this post


Link to post
Share on other sites

the skip and path parameters were from a differnt site on google i was originally using the ones from 7zsfx.info but then switched around heres a altered version

;!@Install@!UTF-8!

GUIMode="1"

InstallPath="s"

RunProgram="test.bat"

;!@InstallEnd@!

note that test.bat may be replaced with a differnt one altogether or removed if i decide to use a start with wait from the cmd in my uninstaller

if i do the cmd batch will simnply say to start /wait "sounds.exe" "%path%\sounds.exe"

%path% will be defined earlier in the batch or defined as a differnt variable like %var%

Edited by red death68
0

Share this post


Link to post
Share on other sites

Hi,

The modified .sfx modules are great: they're the basis for all of my tools. In fact, my most important tool is an sfx-based tool that makes other sfx-based tools by providing a customized command line interface to build the config.txt file, specify the files to be zipped and included, and to copy everything to the .exe file.

(That tool, makeexe.exe can be found here Download MakeExe.exe. Unzip it and then type MakeExe.exe /? and/or use 7z to unpack it and see the internal parts and readme files. I've also attached MakeExe.exe here.)

At any rate, I have a great need to know the directory from which a tool is called, because many of my tools have relative file and/or directory names as parameters, for example:

myuncompress.exe dir1 dir2 ...

I need something like:

myuncompress.exe -SetEnvironment="MY_CD=%CD%" dir1 dir2 ...

only where the

-SetEnvironment="MY_CD=%CD%"

is instead done either in config.txt and/or is supplied by a new intrinsic variable akin to %%T or %%S,

because I don't won't my users to have to specify irrelevant information as a tool parameter.

I've tried several things and none work.

For instance, including

SetEnvironment="MY_CD=%%CD%%" into config.txt merely yields:

MY_CD=%CD%

when the archive program accesses MY_CD.

The situation is hopeless if a system temp directory is used for the extraction, so when I need a program that uses

relative file/directory names, I have the archive extracted into a directory relative to the invoking directory with

a config.txt file similar to the following:

;!@Install@!UTF-8!

SetEnvironment="USE_TEMP_DIR=NO"

InstallPath=".\\TempExtractDiretory"

SetEnvironment="EXTRACT_DIR=%%T"

GUIMode="1"

ExtractTitle="Extracting myuncompress.bat"

RunProgram="myuncompress.bat"

Delete="%%T"

;!@InstallEnd@!

Inside myuncompress.bat, I have code like

Set SavedExtractDir=%CD%

IF DEFINED EXTRACT_DIR (

IF /I "%USE_TEMP_DIR%" NEQ "YES" (CD ..)

)

to decide if the extraction directory is relative to the calling directory, and then by doing

CD ..

I can obtain the directory from which the archived program was invoked.

It would be so much simpler, so much more useful, and so much more elegant if a new variable like %%C

was made available to indicate the invoking directory. (Note that %%S does not work because that is the

location of the archive program and not the directory from which it was invoked.)

(Another possibility would be to add another well-defined environmental variable %InvocationDirectory% that contains the directory path of the invoking directory, similar to %CommonDesktop%, %CommonDocuments%, etc.)

Thanks, Asok.

PostScript:

Well, at least I now know why

SetEnvironment="MY_CD=%%CD%%"

does not work.

The source code uses the "ExpandEnvironmentStrings" string function to expand environmental variables, but a community comment on the MS msdn.microsoft.com web page that documents this functions notes:

"The 'CD' and 'ERRORLEVEL' values are not expanded

Note that this function really doesn't work the same way as the CMD shell at all -- like the documementation notes, it doesn't do the fancy expansion. But it also doesn't expand the CD or ERRORLEVEL "variables" either."

I really need for the source code to make a call to GetCurrentDirectory and put the results in an evironmental value, because that looks like that is the only way this information will be available to the user program.

MakeExe.zip

Edited by Asok
0

Share this post


Link to post
Share on other sites

haiiiiiiiiiiiiiiiiii

I need to copy some files to c:\

i used this code but not working :

--------------------------------------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="cmd /c xcopy *.* \"%SystemDrive%" /y /h"

;!@InstallEnd@!

---------------------------------------------

What the true code i used to copy????????????

0

Share this post


Link to post
Share on other sites

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="cmd /c xcopy *.* \"%SystemDrive%\" /y /h"
;!@InstallEnd@!

Probably because you were missing a backslash from one of your quotes

Edit: try this slightly improved version (hides console window and added %%T=full extraction path)

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="hidcon:xcopy \"%%T\\*.*\" \"%SystemDrive%\" /y /h"
;!@InstallEnd@!

Edited by ricktendo64
0

Share this post


Link to post
Share on other sites

and added %%T=full extraction path

This is too much ... :)

possible way:

RunProgram="xcopy *.* %SystemDrive% /y /h"

Edited by gora
0

Share this post


Link to post
Share on other sites

and added %%T=full extraction path

This is too much ... :)

possible way:

RunProgram="xcopy *.* %SystemDrive% /y /h"

not working

0

Share this post


Link to post
Share on other sites

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="cmd /c xcopy *.* \"%SystemDrive%\" /y /h"
;!@InstallEnd@!

Probably because you were missing a backslash from one of your quotes

Edit: try this slightly improved version (hides console window and added %%T=full extraction path)

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="hidcon:xcopy \"%%T\\*.*\" \"%SystemDrive%\" /y /h"
;!@InstallEnd@!

+

not work

0

Share this post


Link to post
Share on other sites

You can find help also reading the guide, here:

http://7zsfx.info/en/

As example given for Total Commander:

;!@Install@!UTF-8!

Title="Total Commander 7 installation"

BeginPrompt="Total Commander file manager will be installed\nnow with English interface language.\n\nLearn about other installation scenarios\nby pressing \"Cancel\" and launching this\nSFX again with '-?' or '-h' switch."

; Installation folder

SetEnvironment="PathTC=%ProgramFiles%\\TOOLS\\Total Commander"

SetEnvironment="Var1=%PathTC%\\"

SetEnvironment="Var2=\"%PathTC%\""

; Deleting the previous installation registry keys

SetEnvironment="DelKey1=hidcon:cmd /c reg delete \"hkcu\\Software\\Ghisler\" /f"

SetEnvironment="DelKey2=hidcon:cmd /c reg delete \"hklm\\Software\\Ghisler\" /f"

; "Clean" TC installation

RunProgram="%DelKey1%"

RunProgram="%DelKey2%"

RunProgram="fm20:tcmd7pb3_E.exe"

AutoInstall1="%DelKey1%"

AutoInstall1="%DelKey2%"

AutoInstall1="fm20:tcmd7pb3_E.exe"

; Russian localization

AutoInstall2="hidcon:cmd /c xcopy Language \"%Var1%Language\" /s /e /i /y"

AutoInstall2="hidcon:cmd /c copy !ReadMe_Rus.txt %Var2%"

AutoInstall2="hidcon:cmd /c copy Hist_rus.txt %Var2%"

AutoInstall2="hidcon:cmd /c copy Keyb_rus.txt %Var2%"

; Personal settings

AutoInstall3="hidcon:cmd /c copy Default.bar %Var2%"

AutoInstall3="hidcon:cmd /c copy default.br2 %Var2%"

AutoInstall3="hidcon:cmd /c copy wcx_ftp.ini %Var2%"

AutoInstall3="hidcon:cmd /c copy wincmd.ini %Var2%"

; License keyAutoInstall4="hidcon:cmd /c copy wincmd.key %Var2%"

; Encryption support

AutoInstall5="hidcon:cmd /c copy wcmzip32.dll %Var2%"

; Plugins and utilities

AutoInstall6="hidcon:cmd /c xcopy Info \"%Var1%Info\" /s /e /i /y"

AutoInstall6="hidcon:cmd /c xcopy Plugins \"%Var1%Plugins\" /s /e /i /y"

AutoInstall6="hidcon:cmd /c xcopy Utils \"%Var1%Utils\" /s /e /i /y"

; Graphic and media file viewer

AutoInstall7="hidcon:cmd /c xcopy IrfanView \"%Var1%IrfanView\" /s /e /i /y"

; TC autorun when a USB flash drive is inserted

AutoInstall8="hidcon:cmd /c \"regedit -s ForAutoplayTC.reg\""

; Full TC installation

AutoInstall="%DelKey1%"

AutoInstall="%DelKey2%"

AutoInstall="fm20:tcmd7pb3_E.exe"

AutoInstall="hidcon:cmd /c \"del tcmd7pb3_E.exe /q\""

AutoInstall="hidcon:cmd /c xcopy %%T %Var2% /s /e /i /y"

AutoInstall="hidcon:cmd /c \"regedit -s ForAutoplayTC.reg\""

GUIFlags="2+4+8+16+32+2048+4096"GUIMode="1"

ExtractTitle="Extracting files..."

ExtractDialogText="Hang on, we are almost done."

Shortcut="26,{%Var1%TOTALCMD.EXE},{},{Microsoft\\Internet Explorer\\Quick Launch},{File manager},{Total Commander}"

HelpText="If you launch this SFX archive without switches, Total Commander (TC)\nwill be installed (unregistered version) with English interface language.\n\nIf you launch this SFX archive with switches (number below is a key),\nyou will get:\n\t1 Total Commander (required switch)\n\t2 Russian localization\n\t3 Configuration files\n\t4 Legally purchased license key\n\t5 ZIP-dll with encryption support\n\t6 Plugins\n\t7 IrfanView viewer\n\t8 Autorun TC when USB flash drive is inserted\n\nIf the SFX is launched with switch:\n '-ai12345678' - You get \"full\" TC\n '-ai1245' - You keep the original TC interface\n '-ai125' - You get TC with Russian interface.\n\nMake up your mind and launch the SFX with the switches you need!"

FinishMessage="Total Commander 7 has been installed.\n\nClick the TC icon on the Quick Launch\ntool bar to launch the program."

;!@InstallEnd@!

Edited by myselfidem
0

Share this post


Link to post
Share on other sites
not working

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="xcopy *.* %SystemDrive%\\ /y /h"
;!@InstallEnd@!

0

Share this post


Link to post
Share on other sites

I need true code please

i need to know What meaning of :

%Var1%

%Var2%

%PathTC%

%DelKey1%

%DelKey2%

0

Share this post


Link to post
Share on other sites

I need true code please

i need to know What meaning of :

%Var1%

%Var2%

%PathTC%

%DelKey1%

%DelKey2%

They are whatever you make them

0

Share this post


Link to post
Share on other sites

@eltunisie

After many tests I see that works if I add a folder to copy the files inside "Systemdrive%\\Folders", like this:

config.txt

-------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="hidcon:cmd /c xcopy %%T\\*.* %SYSTEMDRIVE%\\Folders /s /e /i /y"

;!@InstallEnd@!

Give the name you want for the destination folder! This one will be created with the name you give!

Works fine!

Remember to save the config.txt in UTF-8 encoding

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

@eltunisie

After many tests I see that works if I add a folder to copy the files inside "Systemdrive%\\Folders", like this:

config.txt

-------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="cmd /c xcopy %%T\\.* %SYSTEMDRIVE%\\Folders /s /e /i /y"

;!@InstallEnd@!

Give the name you want for the destination folder! This one will be created with the name you give!

Remember to save the config.txt in UTF-8 encoding

thanks

but i need to copy ghost files and boot.ini to c:\

if this fildes add in folder inside c:\ not woke in boot windwos

0

Share this post


Link to post
Share on other sites

I've updated my last post about a little error and added hidcon: (to hide the command window)

RunProgram="hidcon:cmd /c xcopy %%T\\*.* %SYSTEMDRIVE%\\Folders /s /e /i /y"

You can also use a batch file to copy your files inside C:\ using SFX modified module!

config.txt

-------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="hidcon:install.cmd"

;!@InstallEnd@!

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

Works fine like below!! :rolleyes:

You can do like this and your folders will be copied on C:\ drive

config.txt

----------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="hidcon:cmd /c xcopy %%T\\*.* %SYSTEMDRIVE%\\ /s /e /i /y"

;!@InstallEnd@!

Tested and works fine!

Enjoy!

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

Works fine like below!! :rolleyes:

You can do like this and your folders will be copied on C:\ drive

config.txt

----------------

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="hidcon:cmd /c xcopy %%T\\*.* %SYSTEMDRIVE%\\ /s /e /i /y"

;!@InstallEnd@!

Tested and works fine!

Enjoy!

I'm sorry

not working

I will uplode my files and you say what the wrong???????

http://www.mediafire.com/?7h8lcrk916w6lqd

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.