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

#426
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag
AFAIK, gora's solution will only log the error code. Your code will then have to read it to find out what it was.

Cheers and Regards

Posted Image



How to remove advertisement from MSFN

#427
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • Joined 29-April 13
  • OS:Windows 7 x64
  • Country: Country Flag

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


Because I am running a script inside the script. The first script will execute the main sfx.exe and will wait for a specific exit codes in order to Report the system that execution of "myprogram.exe" (program inside the sfx.exe) was executed with or without errors.

Cheers,

c0nf

#428
gora

gora

    Member

  • Member
  • PipPip
  • 151 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

or will propagate it also in the exit code of my sfx file?

No. The module will return only your own exit code.

Edited by gora, 10 June 2013 - 04:52 AM.


#429
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
  • Joined 09-July 07

No. The module will return only your own exit code.

Correction: it's (module's) exit code.
At now no way to return external program exit code.

#430
j7n

j7n

    Member

  • Member
  • PipPip
  • 283 posts
  • Joined 18-December 06
  • OS:XP Pro x86
  • Country: Country Flag
Is it possible to add a vertical scroll bar to the control containing BeginPrompt text to display more text in it than fits in the dialog (description of the archive contents, usage of the software in it, etc.)?

I am considering migrating to SevenZip from WinRar to use a larger compression dictionary, and need this functionality that's present in WinRar SFX modules (both old ones and new ones that call a MSIE window to show the text).

Sample screenshot

#431
c0nfuser

c0nfuser
  • Member
  • 7 posts
  • Joined 29-April 13
  • OS:Windows 7 x64
  • Country: Country Flag


No. The module will return only your own exit code.

Correction: it's (module's) exit code.
At now no way to return external program exit code.


Thank you for the clarification. It would be amazing if you can include this option in the feature.

Cheers,

c0nf

#432
Forseti

Forseti
  • Member
  • 3 posts
  • Joined 06-April 11
  • OS:Windows 7 x64
  • Country: Country Flag

For ProgramData:

 

cmd /c Del /F /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Test\Test.lnk"

 

 

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
RunProgram="hidcon:cmd /c del /F /S /Q ?????????????????????????????\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

 

For AppData:

 

cmd /c Del /F /S /Q "C:\Users\Test\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Test\Test.lnk"

 

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
RunProgram="hidcon:cmd /c del /F /S /Q ???????????????????????\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

 

how to remove shortcuts? please help!



#433
gora

gora

    Member

  • Member
  • PipPip
  • 151 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

SfxFolder23=C:\ProgramData\Microsoft\Windows\Start Menu\Programs
SfxFolder02=C:\Users\gora\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

 

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
Delete="%SfxFolder23%\\Test\\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

 

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
Delete="%SfxFolder02%\\Test\\Test.lnk"
GUIMode="2"
;!@InstallEnd@!



#434
Escorpiom

Escorpiom

    Junior

  • Member
  • Pip
  • 88 posts
  • Joined 18-January 09
  • OS:none specified
  • Country: Country Flag

Is it possible for someone to post a link to the latest 7z SFX Tools (1.6 develop build 2712 December 30, 2012)?

It seems the file is offline, getting a 404.

 

Cheers.



#435
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
  • Joined 09-July 07

http://svn.7zsfx.org...zsd_160_2712.7z



#436
ricpersi

ricpersi
  • Member
  • 3 posts
  • Joined 05-March 14
  • OS:Windows 7 x64
  • Country: Country Flag

Hi all,

 

  I was wondering if it's possible to add a config option to enable the unattended installation without the need of passing "-y" as a command line argument.

 

Thanks a lot in advance



#437
ricktendo

ricktendo

    Group: Banned Members

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,307 posts
  • Joined 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Hi all,

 

  I was wondering if it's possible to add a config option to enable the unattended installation without the need of passing "-y" as a command line argument.

 

Thanks a lot in advance

 

GUIMode="2"



#438
ricpersi

ricpersi
  • Member
  • 3 posts
  • Joined 05-March 14
  • OS:Windows 7 x64
  • Country: Country Flag

 

Hi all,

 

  I was wondering if it's possible to add a config option to enable the unattended installation without the need of passing "-y" as a command line argument.

 

Thanks a lot in advance

 

GUIMode="2"

 

 

hi ricktendo,

 

  sorry I forgot to say that I'd like to have the progress bar displayed while unpacking. Thanks a lot for your help.



#439
ricpersi

ricpersi
  • Member
  • 3 posts
  • Joined 05-March 14
  • OS:Windows 7 x64
  • Country: Country Flag

Hi all,

 

  I'm trying to compile 7zsfx from sources but I'm getting an error. Han anyone compiled it succesfully before? Do you know how I can solve the following linking error?

 

 

------ Build started: Project: 7zSfxMod, Configuration: All Win32 ------
Linking...
LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported;  ignored
AES.obj : error LNK2019: unresolved external symbol @AesCtr_Code_Intel@12 referenced in function _AesGenTables
AES.obj : error LNK2019: unresolved external symbol @AesCbc_Decode_Intel@12 referenced in function _AesGenTables
AES.obj : error LNK2019: unresolved external symbol @AesCbc_Encode_Intel@12 referenced in function _AesGenTables
..\Output\Win32\7zsd_All.sfx : fatal error LNK1120: 3 unresolved externals
Build log was saved at "file://c:\temp\7zsd_src_160_2712\Intermediate\Win32\All\BuildLog.htm"
7zSfxMod - 4 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
 

I'm using VS2008 with latest Microsoft sdk. Thanks a lot for your help.

 

Regards,

 

  Riccardo

 


#440
zorro1

zorro1

    Junior

  • Member
  • Pip
  • 84 posts
  • Joined 02-November 03

Hello

 

how to modify or add pitcure in 7zsd_lzma_dialogs.sfx ?

 

i want to add my or replace original image in sfx to my install. 

 

 

thanks



#441
ricktendo

ricktendo

    Group: Banned Members

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,307 posts
  • Joined 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Use a resource hacker, I do the same with my .net slim installer, I add a new bmp and edit the layout so it looks like this

 

sHBW8q3.png



#442
zorro1

zorro1

    Junior

  • Member
  • Pip
  • 84 posts
  • Joined 02-November 03

@rickendo

 

i try with resource hacker, but i can't modify  ressource IMAGES 3001

 

How to ?

 

thanks



#443
madserb

madserb
  • Member
  • 2 posts
  • Joined 12-June 14
  • OS:Windows 7 x64
  • Country: Country Flag

Hi,

I have been using the modified 7zsfx for a while now and have come across a problem

I am re-compressing some of my old dos games and running them using dosbox. I have a problem with config.txt for every one of them.

When compiled to an SFX exe it will fail when it detects the (  "  ) symbols. These are necessary for the shortcut to work

The original version install shortcuts with them in but when I duplicate them using my own config script it fails at line 13

Here is an example of my config.txt:


;!@Install@!UTF-8!
Title="Redneck Rampage"
BeginPrompt="\nPack Includes:\n\nRedneck Rampage\nCuss Pack\nManual and Cheats"
CancelPrompt="Are you sure you want to cancel ?"
GUIFlags="4+8+16+32+64+256+2048+4096"
GUIMode="1"
OverwriteMode="0"
InstallPath="%ProgramFiles%\Redneck Rampage"
ExtractPathText="Choose your \"Redneck Rampage\" installation folder..."
ExtractPathTitle="Redneck Rampage"
ExtractCancelText="Abort"
Shortcut="Du,{%%T\\Redneck Rampage Manual.pdf},{},{Redneck Rampage},{Redneck Rampage Manual},{Manual},{%%T},{},{}"
Shortcut="Du,{%%T\\DOSBox.exe},{-conf "dosboxRR.conf" -conf "dosboxRR_single.conf" -noconsole -c exit},{Redneck Rampage},{Game},{Redneck Rampage},{%%T},{%%T/RR.ico},{}"
RunProgram="\"%%T\\unpack.bat\""
;!@InstallEnd@!


This is the original working shortcut I wish to re-create:
"%ProgramFiles%\DOSBox.exe" -conf "Redneck Rampage\dosboxRR.conf" -conf "dosboxRR_single.conf" -noconsole -c exit

How can I include the " in the line without it failing at line 13?

I would really appreciate someones help

Thanks



#444
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

I'm not sure, but don't you just have to "escape" the inner quotes (") with a backslash like this -- \" -- like they are on line 14?

 

Cheers and Regards


Posted Image


#445
gora

gora

    Member

  • Member
  • PipPip
  • 151 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

;!@Install@!UTF-8!
Title="Redneck Rampage"
BeginPrompt="\nPack Includes:\n\nRedneck Rampage\nCuss Pack\nManual and Cheats"
CancelPrompt="Are you sure you want to cancel ?"
GUIFlags="4+8+16+32+64+256+2048+4096"
GUIMode="1"
OverwriteMode="0"
InstallPath="%ProgramFiles%\\Redneck Rampage"
ExtractPathText="Choose your \"Redneck Rampage\" installation folder..."
ExtractPathTitle="Redneck Rampage"
ExtractCancelText="Abort"
Shortcut="Du,{%%T\\Redneck Rampage Manual.pdf},{},{Redneck Rampage},{Redneck Rampage Manual},{Manual},{%%T},{},{}"
Shortcut="Du,{%%T\\DOSBox.exe},{-conf \"dosboxRR.conf\" -conf \"dosboxRR_single.conf\" -noconsole -c exit},{Redneck Rampage},{Game},{Redneck Rampage},{%%T},{%%T\\RR.ico},{}"
RunProgram="unpack.bat"
;!@InstallEnd@!



#446
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

I was close. :)

 

Cheers and Regards


Posted Image


#447
madserb

madserb
  • Member
  • 2 posts
  • Joined 12-June 14
  • OS:Windows 7 x64
  • Country: Country Flag

Many thanks...as easy as that!!! :)



#448
Forseti

Forseti
  • Member
  • 3 posts
  • Joined 06-April 11
  • OS:Windows 7 x64
  • Country: Country Flag

xcopy does not create directory structure!

;!@Install@!UTF-8!
RunProgram="Setup_%%P.msi /qr"
RunProgram="hidcon:xcopy config.xml \"%appdata%\Mythicsoft\FileLocatorPro\config\" /s /y"
GUIMode="2"
;!@InstallEnd@!
C:\Users\Forseti\AppData\Roaming\Mythicsoft\FileLocatorPro\config

please help!



#449
gora

gora

    Member

  • Member
  • PipPip
  • 151 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

xCopy /?



#450
nova-s

nova-s
  • Member
  • 5 posts
  • Joined 06-August 14
  • OS:Windows 7 x64
  • Country: Country Flag

hi,

 

only on 64bit i have a problem with a 1 line .bat script running from/under sfx (as admin)
i'm using 7zsd.sfx version 1.6 1.5 (stable build 2712), it works fine on 32bit
the .bat itself also works fine on 64bit if i start it directly as admin - from %temp% or whereever:

echo on
attrib -s -h -r %SYSTEMROOT%\system32\drivers\etc\hosts
pause

but when i run it from an sfx archive (as admin) it ALWAYS results in
Path not found - C:\Windows\system32\drivers\etc

i have tried many things (also in combination, all working if started directly):

attrib -s -h -r c:\windows\system32\drivers\etc\hosts

attrib -s -h -r %SYSTEMROOT%\sysnative\drivers\etc\hosts

attrib -s -h -r %SYSTEMROOT%\system32\..\system32\drivers\etc\hosts

cd /d %SYSTEMROOT%\system32\drivers\etc
attrib -s -h -r hosts

i have also tried an attrib.exe copied from a 32bit version - same

in sysinternals' process monitor then i saw that attrib.exe was searching in
C:\Windows\SysWOW64\drivers\etc

which is definetely wrong. how is this possible?
 

 

EDIT: a similar problem occures if i use the variable %programfiles% on 64bit - it resolves to

C:\Program Files (x86)

but here i can use the simple workaround

"%programfiles%\..\Program Files\whatever"


Edited by nova-s, 07 August 2014 - 11:34 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN