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

#401
mooms

mooms

    Hello world !

  • Member
  • PipPipPip
  • 303 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Or you could use 64 bit module.

Also, from Wikipedia:


%ProgramFiles%

This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).


How to remove advertisement from MSFN

#402
alfreire

alfreire

    Member

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

Or you could use 64 bit module.

Also, from Wikipedia:


%ProgramFiles%

This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).

Thanks for info... :thumbup
Regards... ;)

#403
Tduy

Tduy
  • Member
  • 4 posts
  • OS:none specified
  • Country: Country Flag
how set Password for .sfx

#404
alfreire

alfreire

    Member

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

how set Password for .sfx

You must put password in *.7z file, before make *.sfx file...
Regards... ;-)

#405
DomenicP

DomenicP
  • Member
  • 2 posts
  • OS:none specified
  • Country: Country Flag


;!@Install@!UTF-8!
GUIMode="1"
MiscFlags="4"
RunProgram="x86:hidcon:file_x86.cmd"
RunProgram="x64:hidcon:file_x64.cmd"
;!@InstallEnd@!

file_x86.cmd:
rename "%CommonProgramFiles(x86)%\Program\Test\library.dll" library.bak
xcopy /y library.dll "%CommonProgramFiles(x86)%\Program\Test\"
del /F /Q "%ProgramFiles(x86)%\Program\Test\file.exe"
regedit /S regfile.reg 
shutdown -r -t 3

Regards... ;-) :hello:


Inside your config.txt, try: GUIMode="2"

config.txt (saved as UTF-8 file)
;!@Install@!UTF-8!
GUIMode="2"
MiscFlags="4"
RunProgram="x86:hidcon:cmd /c \"%%T\\file_x86.cmd""
RunProgram="x64:hidcon:cmd /c \"%%T\\file_x64.cmd""
;!@InstallEnd@!

I think the batch need to be improved:

file_x86.cmd
@echo off
MKDIR "%CommonProgramFiles(x86)%\Program\Test"
XCOPY /Y "%~dp0library.dll" "%CommonProgramFiles(x86)%\Program\Test\" /C /I /E /H /R
REN "%CommonProgramFiles(x86)%\Program\Test\library.dll" library.bak
DEL /F /Q "%ProgramFiles(x86)%\Program\Test\file.exe"
REGEDIT /S "%~dp0regfile.reg" 
shutdown -r -t 3

Assuming the regfile.reg and library.dll are inside your SFX file!

However, I think it's not a good idea to restart the computer at last using SFX file with a batch file!
Because the temp folder will be removed and the batch file is already in use and errors may occurs.

*Edit: errors about quotes inside config.txt updated and corrected!


Hello,

Hopefully I can get some help. The MiscFlags="4" is not working for me as well. I tried using the 7zsd_All.sfx and 7zsd_LZMA2.sfx. I'm very new to SFX so just to be clear - I would like the sfx executable I'm creating to prompt for administrator.

Config:


;!@Install@!UTF-8!
Title="Enterprise 6.0.1"
GUIMode="2"
MiscFlags="4"
RunProgram="x64:%%T\x64\setup.exe"
RunProgram="x86:%%T\x86\setup.exe"
;!@InstallEnd@!


Thanks in advanced!

Edited by DomenicP, 12 November 2012 - 02:15 PM.


#406
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 446 posts
  • OS:Windows 7 x64
  • Country: Country Flag
There seems to be a bug in the x64 modules, if an other program injects a hook.

7zip sfx - application error

#407
DomenicP

DomenicP
  • Member
  • 2 posts
  • OS:none specified
  • Country: Country Flag

Hello,

Hopefully I can get some help. The MiscFlags="4" is not working for me as well. I tried using the 7zsd_All.sfx and 7zsd_LZMA2.sfx. I'm very new to SFX so just to be clear - I would like the sfx executable I'm creating to prompt for administrator.

Config:


;!@Install@!UTF-8!
GUIMode="2"
MiscFlags="4"
RunProgram="x64:%%T\x64\setup.exe"
RunProgram="x86:%%T\x86\setup.exe"
;!@InstallEnd@!


Thanks in advanced!


Can anyone please help me out? This is driving me crazy and I need to resolve it. Thanks you.

#408
maddyrox

maddyrox
  • Member
  • 6 posts
  • OS:none specified
  • Country: Country Flag
I have one question regarding SFX archives created using WinRAR and I am expecting a very fast reply as it is very urgent for me.

I have to create one SFX file that can be installed in both, 32 or 64 bit machines. But, I want to know if it is possible to give the extraction path dynamically, i mean Can the SFX itself decide in which %ProgramFiles% it should extract contents.? In 32 bit we have Program Files folder and in 64 bit, we have Program files(x86).
Please help me ASAP

#409
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,796 posts
  • OS:none specified
  • Country: Country Flag
I know you are desperate, but posting the same post in multiple places will not get you a response any faster, you will just p*ss people off and you will be ignored. No one cares how urgent it is for you - that is not our problem. Pick ONE thread to leave your post and delete the other posts. It will be seen and someone will respond if they have anything useful.

Cheers and Regards

Posted Image


#410
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts

There seems to be a bug in the x64 modules, if an other program injects a hook.

7zip sfx - application error

Can you give a beta version of the SuRun for reproduce error? I can't download it now.

#411
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 446 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Can you give a beta version of the SuRun for reproduce error? I can't download it now.

It does not seems to occur in the recent beta 6, but happens here in SuRun1211b5.zip

Edited by JFX, 18 January 2013 - 02:37 PM.


#412
alfreire

alfreire

    Member

  • Member
  • PipPip
  • 121 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hello... I have a problem with some 7zsfx files in Windows 8 (other files works perfect)... I got error message : "Non 7z archive." That 7zsfx files works perfect in Win XP, Win 7 x86 and x64... :unsure:

An example of config file:
;!@Install@!UTF-8!
GUIMode="0"
MiscFlags="4"
GUIFlags="2+4+8+16+32+2048"
Title="Mozilla Firefox v19.0 b4 esp Silent..."
BeginPrompt="   Creado por -=cr@ckm@n=-

¿Quieres instalar Mozilla Firefox...?"
ExtractTitle="Extrayendo archivos..."
ExtractDialogText="Mozilla Firefox v19.0 b4 español"
ExtractCancelText="Cancelar la instalación"
RunProgram="setup.exe -ms"
FinishMessage="Instalación finalizada correctamente... ;-)"
;!@InstallEnd@!

Regards... ;-)

Attached Files


Edited by alfreire, 31 January 2013 - 09:26 AM.


#413
alfreire

alfreire

    Member

  • Member
  • PipPip
  • 121 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Well.. I auto-answer to myself... :sneaky: I updated sfx module to v1.6 develop (build 2712) and works now... :whistle:

Regards... ;-)

Edited by alfreire, 31 January 2013 - 11:09 AM.


#414
odar

odar

    Newbie

  • Member
  • 11 posts
  • OS:Windows 8 x64
  • Country: Country Flag
http://sourceforge.n...-zipsfxbuilder/

#415
alfreire

alfreire

    Member

  • Member
  • PipPip
  • 121 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hi, friends... One question, how to make work this command...?
Delete="%%T\\*.reg"
*.reg not working... I tried this
Delete="%%T\\\"*.reg\""
and this
Delete="\"%%T\\*.reg\""
and this
SetEnvironment="Variable1=*.reg"
Delete="%%T\\%Variable1%"
but not working too... :no:
Regards... ;-)

p.d.: This command works perfect...
RunProgram="hidcon:cmd /c del \"%%T\\*.reg\""

Edited by alfreire, 26 April 2013 - 09:37 AM.


#416
gora

gora

    Member

  • Member
  • PipPip
  • 147 posts
  • OS:Windows 7 x64
  • Country: Country Flag
2 alfreire

The module does not support wildcard (*,?)

#417
alfreire

alfreire

    Member

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

2 alfreire

The module does not support wildcard (*,?)

Thank you very much, Gora... appreciate your help... :rolleyes:
Cheers and regards... ;-)

#418
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hello,

I would like to know If is possible to give the extraction path as a parameter.

i.e In config.txt file I set the InstallPath="%TEMP%" dir for extraction path but I want the user to have the option to choose the extraction path and overwrite the setting in config file.

is that possible?

Cheers,

c0nf

#419
gora

gora

    Member

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

is that possible?

Yes.
sfx.exe -InstallPath="%ProgramFiles%\\NewFolder"


#420
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag
thank you very much for your fast reply, it works!

Cheers

#421
odar

odar

    Newbie

  • Member
  • 11 posts
  • OS:Windows 8 x64
  • Country: Country Flag
this reg file for create module sfx.exe to context menu right clic
Attached File  7zsfx3.reg   2.42KB   17 downloads
add 3 voice

create 7z archive (folder compress in 7z)
create sfx (folder container module 7zs*.sfx + file conf*.txt + file *.7z)
create sfx folder (module sfx + file config.txt in folder compress and convert in sfx)


file (win_7_8_contexmenu_ 7zsfx.7z for win 7-8 reg) file in context menu in cascade mode work in window 7 and windows 8 (x86 x64)
Attached File  win_7_8_contexmenu_ 7zsfx.7z   121.71KB   20 downloads

Edited by odar, 24 May 2013 - 06:40 AM.


#422
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hello,

I would like to ask if is possible to propagate the exit code of "myprogram.exe" when the sfx file finish?
;!@Install@!UTF-8!
GUIMode="2"
RunProgram="myprogram.exe"
Autoinstall="myprogram.exe"
;!@InstallEnd@!

For example if myprogram.exe will exit with code 9 I want sfx file to return the same code.

Thank you,

c0nf

#423
gora

gora

    Member

  • Member
  • PipPip
  • 147 posts
  • OS:Windows 7 x64
  • Country: Country Flag
;!@Install@!UTF-8!

GUIMode="2"

RunProgram="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""

Autoinstall="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""

;!@InstallEnd@!


#424
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • OS:Windows 7 x64
  • Country: Country Flag

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
Autoinstall="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
;!@InstallEnd@!


Hi gora,

thank you for your answer,

I can't test it for the moment to be sure so just to clarify for the forum operation :),
is this command will just print the Exit code in the error.txt file or will propagate it also in the exit code of my sfx file?

Cheers,

c0nf

#425
alfreire

alfreire

    Member

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

Hello,

I would like to ask if is possible to propagate the exit code of "myprogram.exe" when the sfx file finish?

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

For example if myprogram.exe will exit with code 9 I want sfx file to return the same code.

Thank you,

c0nf

I think understand your question, but don't understand why...? can you explain me...?
Regards... ;-)

Edited by alfreire, 09 June 2013 - 03:43 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN