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
438 replies to this topic

#226
Oleg_Sch

Oleg_Sch

    Newbie

  • Members
  • 34 posts
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, 17 May 2011 - 03:35 AM.



How to remove advertisement from MSFN

#227
coucou

coucou

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 837 posts
TNX Oleg for the update ;)

#228
coucou

coucou

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 837 posts
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

#229
gora

gora

    Member

  • Members
  • PipPip
  • 145 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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

#230
coucou

coucou

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 837 posts
TNX gora for yr help ;)

#231
red death68

red death68

    Newbie

  • Members
  • 14 posts
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?

#232
ricktendo

ricktendo

    Group: Banned Members

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,283 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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

#233
red death68

red death68

    Newbie

  • Members
  • 14 posts
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)

#234
gora

gora

    Member

  • Members
  • PipPip
  • 145 posts
  • OS:Windows 7 x64
  • Country: Country Flag

;!@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!

#235
red death68

red death68

    Newbie

  • Members
  • 14 posts
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, 25 May 2011 - 12:22 PM.


#236
Asok

Asok
  • Members
  • 6 posts
  • OS:XP Pro x86
  • Country: Country Flag
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.

Attached Files


Edited by Asok, 29 May 2011 - 12:55 PM.


#237
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag
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????????????

#238
ricktendo

ricktendo

    Group: Banned Members

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,283 posts
  • OS:Windows 7 x64
  • Country: Country Flag
;!@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, 18 June 2011 - 12:41 PM.


#239
gora

gora

    Member

  • Members
  • PipPip
  • 145 posts
  • OS:Windows 7 x64
  • Country: Country Flag

and added %%T=full extraction path

This is too much ... :)
possible way:
RunProgram="xcopy *.* %SystemDrive% /y /h"

Edited by gora, 18 June 2011 - 12:47 PM.


#240
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag


and added %%T=full extraction path

This is too much ... :)
possible way:
RunProgram="xcopy *.* %SystemDrive% /y /h"



not working

#241
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag

;!@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

#242
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
You can find help also reading the guide, here:

http://7zsfx.info/en/

As example given for Total Commander:
Spoiler

Edited by myselfidem, 18 June 2011 - 04:52 PM.


#243
gora

gora

    Member

  • Members
  • PipPip
  • 145 posts
  • OS:Windows 7 x64
  • Country: Country Flag

not working

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


#244
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag
I need true code please
i need to know What meaning of :
%Var1%
%Var2%
%PathTC%
%DelKey1%
%DelKey2%

#245
ricktendo

ricktendo

    Group: Banned Members

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,283 posts
  • OS:Windows 7 x64
  • Country: Country Flag

I need true code please
i need to know What meaning of :
%Var1%
%Var2%
%PathTC%
%DelKey1%
%DelKey2%

They are whatever you make them

#246
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
@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, 19 June 2011 - 02:55 PM.


#247
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag

@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

#248
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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, 19 June 2011 - 02:56 PM.


#249
myselfidem

myselfidem

    Member

  • Members
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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, 20 June 2011 - 03:49 AM.


#250
eltunisie

eltunisie

    Newbie

  • Members
  • 16 posts
  • OS:XP Pro x86
  • Country: Country Flag

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...7h8lcrk916w6lqd




2 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


    Google (1)


How to remove advertisement from MSFN