Jump to content

7z SFX Modified Module and Tools


Oleg_Sch

Recommended Posts


Thanks gora,

I just looked through the log for 1.5.0.2100 from revision 1 - 80 and make out four feature additions:

1."waitall" prefix ('wait all childs' of the executed process)

2. MiscFlag '4' - run as administrator

3. BeginPrompt timeout

4. New module variable %%P - OS platform

Also, one initial addition has been removed:

Deletion of redefined config parameters "Parameter=-"

As far as differences from version 1.4.1.2100, is this list correct and complete?

Thanks again.

Hello again... there is any option to "Run as Admin" 7zsfx silent file...? I use MiscFlags="4", but doesn't work...

Regards... ;-)

Edited by alfreire
Link to comment
Share on other sites

Hello

i have a program i would like to be unpack to a folder and make a Shortcut to the desktop for all users.

that i have make but i only works in windows, if i make it run in WPI it unpack but dont make a desktop shortcut

The file has been make by winrar.

BD_Rebuilde.exe

;The comment below contains SFX script commands

Path=C:\Program Files\
Shortcut=D, "C:\Program Files\BD_Rebuilder\BDRB-Genvej.lnk"
SavePath
Silent=1
Overwrite=1

What is wrong with this here. i have try so many things.

I have also try this

Users\All Users\desktop

Users\Public\Public Desktop

Link to comment
Share on other sites

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

Edited by alfreire
Link to comment
Share on other sites

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

Edited by myselfidem
Link to comment
Share on other sites

7zsfx file works perfect in a PC with Admin user... If I want run 7zsfx file in a PC without Admin permissions, I must run file with right click "Run as Administrator" to work... I need know if there is a command to run 7zsfx file with Admin rights...

Thanks by your improvements... If I run restart at the end of file there isn't problem, by now...

1-One question, how I can make a 7zsfx with hidden files...? I can do with password, but I just want the password to prevent decompression, and not for install, as in Button setup by Gora...

2-Other more... How to add this command correctly to "RunProgram="...?

NotepadReplacer116.exe /NOTEPAD="%Programfiles%\Notepad++\notepad++.exe" /VERYSILENT

Regards, and thanks... ;-) :rolleyes:

Edited by alfreire
Link to comment
Share on other sites

Other more... How to add this command correctly to "RunProgram="...?

NotepadReplacer116.exe /NOTEPAD="%Programfiles%\Notepad++\notepad++.exe" /VERYSILENT

I think this could be:

RunProgram:"NotepadReplacer116.exe /NOTEPAD=\"%Programfiles%\\Notepad++\\notepad++.exe" /VERYSILENT"

I can't find NotepadReplacer116.exe on Google !

Try and let us know!

Link to comment
Share on other sites

Other more... How to add this command correctly to "RunProgram="...?

NotepadReplacer116.exe /NOTEPAD="%Programfiles%\Notepad++\notepad++.exe" /VERYSILENT

I think this could be:

RunProgram:"NotepadReplacer116.exe /NOTEPAD=\"%Programfiles%\\Notepad++\\notepad++.exe" /VERYSILENT"

I can't find NotepadReplacer116.exe on Google !

Try and let us know!

It's here:

http://www.binaryfortress.com/NotepadReplacer/#download

I will try your code... Thanks... ;-)

Link to comment
Share on other sites

2-Other more... How to add this command correctly to "RunProgram="...?

NotepadReplacer116.exe /NOTEPAD="%Programfiles%\Notepad++\notepad++.exe" /VERYSILENT

RunProgram:"NotepadReplacer116.exe /NOTEPAD=\"%Programfiles%\\Notepad++\\notepad++.exe\" /VERYSILENT"

Link to comment
Share on other sites

2-Other more... How to add this command correctly to "RunProgram="...?

NotepadReplacer116.exe /NOTEPAD="%Programfiles%\Notepad++\notepad++.exe" /VERYSILENT

RunProgram:"NotepadReplacer116.exe /NOTEPAD=\"%Programfiles%\\Notepad++\\notepad++.exe\" /VERYSILENT"

I will try... and, the other questions...? :angel

Thank you very much... ;-)

Link to comment
Share on other sites

1-One question, how I can make a 7zsfx with hidden files...? I can do with password, but I just want the password to prevent decompression, and not for install, as in Button setup by Gora...

Read here

FAQ, item 2

Link to comment
Share on other sites

Works perfect... THANKS... :thumbup

;!@Install@!UTF-8!
GUIMode="1"
MiscFlags="4"
Title="Notepad++ v6.1.7 Silent Install... "
BeginPrompt=" Creado por alfreire\n \n¿Quieres instalar este programa...?"
GUIFlags="8+2048"
RunProgram="npp.6.1.7.Installer.exe /S"
RunProgram="x86:NotepadReplacer116.exe /NOTEPAD=\"%programfiles%\\Notepad++\\notepad++.exe\" /VERYSILENT"
RunProgram="x64:NotepadReplacer116.exe /NOTEPAD=\"%programfiles(x86)%\\Notepad++\\notepad++.exe\" /VERYSILENT"
FinishMessage="Instalación finalizada con éxito... ;-)"
;!@InstallEnd@!

Edited by alfreire
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...