Jump to content

How to make a 7-Zip Switchless Installer


keytotime
 Share

Recommended Posts

Is the name of the app under 8 characters and has no spaces? Here are two of mine that work. Thank's i fixed the typo.

;!@Install@!UTF-8!
RunProgram="StartX.exe /WAIT \"msiexec /i sav.msi /qb-! RUNLIVEUPDATE=0 REBOOT=REALLYSUPPRESS\""
;!@InstallEnd@!

;!@Install@!UTF-8!
RunProgram="StartX.exe /WAIT \"msiexec /i sav.msi /qb-! RUNLIVEUPDATE=0 REBOOT=REALLYSUPPRESS\""
;!@InstallEnd@!

Link to comment
Share on other sites


  • 2 weeks later...

i write this Autoit Code to auto creat .7z files or .exe(from sfx Files)

but ExE file after built not run the program in SFX comint it alwyes run setup.exe

i don't know wherr is error??!!!

;----------------------------------------------------------------------------

; AutoIt Version: 3.1.0

; Author: Ahmed Bayomy

; ----------------------------------------------------------------------------

if not FileExists("7za.exe") then FileCopy(@ProgramFilesDir & "\7-zip\7za.exe",@ScriptDir & "\7za.exe")

if not FileExists("7z.sfx") then FileCopy(@ProgramFilesDir & "\7-zip\7z.sfx",@ScriptDir & "\7z.sfx")

if not FileExists("7zs.sfx") then FileCopy(@ProgramFilesDir & "\7-zip\7zs.sfx",@ScriptDir & "\7zs.sfx")

if $CmdLine[0] =0 then

MsgBox(0,"Help","Parameters : " & @CRLF & " Folder name to creat 7z file " & @CRLF & " /SFX to creat .EXE " & @CRLF & " Filename to make .exe with autorun this file")

Exit

EndIf

dim $Command,$File

$7zFile='"' & $CmdLine[1] & '.7z"'

$Command="7za.exe a -t7z -mx9 " & $7zFile & ' "' & $CmdLine[1] & '\*" -r -y'

RunWait($Command,"",@SW_HIDE )

if $CmdLine[0] >1 then

if $CmdLine[2]="/SFX" Then

RunWait(@ComSpec & " /c " & "Copy /b " & @ScriptDir & "\7z.sfx + " & $7zFile & ' "' & $CmdLine[1] & '.exe"',"",@SW_HIDE)

FileDelete($7zFile)

Else

;~ -----------------------------

dim $7TXT

$7TXT=FileOpen(@ScriptDir & "\7z.txt",2)

FileWrite($7TXT,";!@Install@!UTF-8!" & @CRLF)

FileWrite($7TXT,"RunProgram=" & '"' & $CmdLine[2] & '"' & @CRLF)

FileWrite($7TXT,";!@InstallEnd@!" & @CRLF)

RunWait(@ComSpec & " /C " & 'Copy /b "' & @ScriptDir & '\7zs.sfx" + "' & @ScriptDir & '\7z.txt" + ' & $7zFile & ' "' & $CmdLine[1] & '.exe"');,"",@SW_HIDE)

EndIf

EndIf

au3SFX.zip

Link to comment
Share on other sites

OK, here you go. This is the same base SFX module I use for my switchless installers. It's got the % complete on the right side of the title (which I think looks better) and only has the extraction progress meter with no cancel button. I compiled it myself with MSVC++ 2003.

7zS.zip

Link to comment
Share on other sites

The only way i can see that I can put stuff like that in is through the config.txt with a .bat file, but completely defeats the purpose of a 7zip installer, cos the extraction would have to go to the same place everytime so i can use the .bat file, I just want it to extract to a temp dir and make a .bat install then copy over crack, then delete temp. That way only 1 file is needed. Can someone tell me what to do?

Link to comment
Share on other sites

I have followed the guide to the letter and failed with PowerDVD both trial and retail versions and a number of other apps too. In fact if I double click my PowerDVD installer from a Windows environment it works perfectly and silently, but when I call it from my RunOnceEx it prompts for the install directory - therefore not silent.

I have now given up trying to make one as I'm getting nowhere and "helpful" suggestions like read the guide again dont assist anyone. I have read it so many times I can quote it verbatim. The guide is good and well written.

Suggestions:

1. maybe a list of apps that have been successful

2. maybe ryanvm or someone could post this customised SFX module that will be more tolerant at the start of the thread

Or is it a case of certain apps are never going to be able to be made into switchless installers by this generic method?

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...