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

How to make a 7-Zip Switchless Installer

* * * * * 3 votes

  • Please log in to reply
287 replies to this topic

#26
fluid

fluid

    Member

  • Member
  • PipPip
  • 109 posts
  • Joined 04-October 03
Thanks for the tutorial! For clarification, the exe that I'm gonna put in the config is the setup application that's gonna launch the setup right? For example im mp10setup.exe, there is the setup_wm.exe file inside. That's the exe that I'm gonna put in the config.txt right?


How to remove advertisement from MSFN

#27
scankurban

scankurban

    F_s_M

  • Member
  • PipPip
  • 240 posts
  • Joined 29-August 03
Why do you need 7zip
Posted Image

#28
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
you asking why u need 7zip?

ah... makes installers smaller. lol :P

#29
fluid

fluid

    Member

  • Member
  • PipPip
  • 109 posts
  • Joined 04-October 03
Wow thanks a lot again for the guide I just made myself a 7zip wmp 10 exe. Cool. It trimmed down about 3 mb.

#30
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
why dont u just integrate it?

#31
fluid

fluid

    Member

  • Member
  • PipPip
  • 109 posts
  • Joined 04-October 03
Integrate?

#32
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
u integrate wmp into your U.A. cd.

look for the guide by Bashrat

#33
EdwardQ

EdwardQ
  • Member
  • 7 posts
  • Joined 25-February 05
I'm having problems getting this to run.

I followed the direction to a T. but when I test it the files look like they are extracted but the msi doesn't install.

Here is my config.txt

;!@Install@!UTF-8!
RunProgram="StartX.exe /WAIT \"msiexec /i Adobe.msi /qb-!\""
;!@InstallEnd@!


If I try via command line StartX.exe /WAIT "msiexec /i Adobe.msi /qb-!" the program installs.


Thxs.


Ed.

#34
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
what are u trying to do shrink adobe acrobat pro?

#35
EdwardQ

EdwardQ
  • Member
  • 7 posts
  • Joined 25-February 05
no reader 6.0. <Looks at the sig> I know there is alrdy a installer but 3 reasons I need to do this. 1) I need to learn, 2) I need to know what to do when I try it on the other other non standard software. 3) I need to learn.

#36
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
KeytoTime is a pioneer in 7zip guides.

If u can't understand i dont know what to tell u it already gives u everything
u need to build a 7zip installer.

My installers are slightly different since i dont use StartX

:(

Prior to using this program i suggest that first learn about adobe acrobat
reader install points. Then follow his guide again step by step.

Cheers

#37
FoLmEr

FoLmEr
  • Member
  • 4 posts
  • Joined 28-June 04
Hi there...

I'm also experiencing rather strange problems with 7zip and this guide.
I'm trying to pack the IntelliPoint software from Microsoft version 4.12 and I already have it install flawlessly from a RunOnceEx command:

IP4_1.msi MM=14 /QR REBOOT=ReallySuppress
The reason I want to pack it is that right now all the install files are unpacked in a folder which obviously takes up more space than a compressed package.

Now, I've compressed the installation files (including StartX.exe), changed icons in the 7zs.sfx, written a config.txt, copied all three files to a single .exe - in other words, followed the guide exactly as stated. The problem is that it won't start the .msi which I instruct it to. Instead, it tries to start the setup.exe which is also in the package. It isn't needed but it's there since I figured it didn't matter.
Here's my config.txt (saved in UTF-8 format):

;!@Install@!UTF-8!
RunProgram="StartX.exe /WAIT \"msiexec /i IP4_1.msi MM=14 /QR REBOOT=ReallySuppress\""
;!@InstallEnd@!
Here comes the strange part: it works like a charm in WinRAR! Here's the comment:
;The comment below contains SFX script commands

Setup=StartX.exe /WAIT "msiexec /i IP4_1.msi MM=14 /QR REBOOT=ReallySuppress"
TempMode
Silent=1
Overwrite=1
I have been able to make similar working 7zip files using this guide, I just can't see why this one doesn't. Also, I've been making 7zip sfx's from ATi catalyst which don't change icons and can't be deleted :blink: Thus I have 4-5 21 mbyte files on my desktop which cannot be deleted from Windows. Strange. I should mention that I'm testing the packages in VMware 5.0 RC2.

What am I doing wrong?


Regards,
FoLmEr

#38
Se7eNdUsT

Se7eNdUsT

    Newbie

  • Member
  • 43 posts
  • Joined 23-June 04
I also am having problems with 7-zip switchless installers.
I compress all the files I want, add 7zs.sfx and config.txt and make the .exe, all edited and works perfectly when tested - except if run during RunOnceEx. If I test with VMware 4.5.2, NeroBR, NVE3, Office2003 and SymantecAV9 do not install at all when run via RunOnceEx. If I run the .exe's after install then they install fine (both in VMware and not).

The 7-zip exe calls "Install.exe" which is just a converted .cmd file, basically following this format:

@ECHO OFF
cmdow @ /HID
ECHO.
TITLE Installing Symantec Antivirus
SymantecAntivirus.msi /qn reboot=reallysuppress liveupdate=0 servergroupname=Username servergrouppass=Userpass
REGEDIT /S Fix.reg
RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Symantec Client Security"
EXIT

SymantecAV and Office2003 are .msi's and both Nero's are .exe's and they both work fine otherwise. Is there something 'pre-first boot' that won't work such as "cmdow @ /HID"?

Cheers for your help.
Sevendust.

-EDIT-
Telling 7-Zip to load Install.cmd rather than converted Install.exe worked a treat.

Astalavista, you seem to use the Quick Batch file Compiler a lot. Know the reason?

#39
keytotime

keytotime

    Advanced Member

  • Member
  • PipPipPip
  • 400 posts
  • Joined 05-October 04
@Se7eNdUsT

Try Calling the .cmd directly.

#40
Se7eNdUsT

Se7eNdUsT

    Newbie

  • Member
  • 43 posts
  • Joined 23-June 04
Cheers keytotime. Reading that 7-Zip couldn't call .msi's I wasn't game to try anything other than .exe's. I'll try now.
EDIT: You're a champ, keytotime. It worked like a charm. Cheers.

Reply to FoLmEr:
Instead of getting the 7-Zip to call StartX.exe with additional paramters, try creating a .cmd file which then calls the msi. Before compiling the 7-Zip sfx, try running the cmd file by itself to test if it works.

#41
FoLmEr

FoLmEr
  • Member
  • 4 posts
  • Joined 28-June 04
It didn't work calling the cmd from 7zip, although it did work just executing the cmd directly from the directory.
;!@Install@!UTF-8!
RunProgram="run.cmd"
;!@InstallEnd@!
run.cmd:
CMDOW @ /HID
@ECHO OFF

start /wait IP4_1.msi MM=14 /QB REBOOT=ReallySuppress

REGEDIT /S ip412.reg

EXIT
It is as if 7zip ONLY wants to call setup.exe because that is the errer I get: A small box titled 7zip and text saying "Can not find setup.exe". This is strange since I've nowhere mentioned setup.exe. Doesn't 7zip execute the install command in the directory it has just extracted to (I think it should but I'm starting to doubt it.)? Then, if the install command is unavailable - which it isn't - it launches the default "setup.exe". Well, if no one can give me an explaination to this behavior, I'm starting to smell a serious bug...

BTW what's the advantage of using the StartX.exe method as the guide describes as opposed to a .cmd file?

And I just testet that even WinRAR works with the .cmd. I'm afraid I'm about to give up on 7zip if I don't find a solution :(

Regards,
FoLmEr

#42
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
KEYTOTIME u are the best. your guide is fantastic

i understood it and applied it right away without any problems.

best regards.

#43
VATERNL

VATERNL

    Newbie

  • Member
  • 34 posts
  • Joined 28-February 05
Ok...you will all call me a newbie, but where do I place the code?
This part totally confuses me atm.

The guide is not really clear on that part ( for me ) :blink:

Can someone explain this part of the guide a bit more :blushing:

Thx in advance.

VATERNL -NEWBIE-

#44
vcBlackBox

vcBlackBox

    Member

  • Member
  • PipPip
  • 144 posts
  • Joined 22-September 04

It didn't work calling the cmd from 7zip, although it did work just executing the cmd directly from the directory.

;!@Install@!UTF-8!
RunProgram="run.cmd"
;!@InstallEnd@!
run.cmd:
CMDOW @ /HID
@ECHO OFF

start /wait IP4_1.msi MM=14 /QB REBOOT=ReallySuppress

REGEDIT /S ip412.reg

EXIT
It is as if 7zip ONLY wants to call setup.exe because that is the errer I get: A small box titled 7zip and text saying "Can not find setup.exe". This is strange since I've nowhere mentioned setup.exe. Doesn't 7zip execute the install command in the directory it has just extracted to (I think it should but I'm starting to doubt it.)? Then, if the install command is unavailable - which it isn't - it launches the default "setup.exe". Well, if no one can give me an explaination to this behavior, I'm starting to smell a serious bug...

BTW what's the advantage of using the StartX.exe method as the guide describes as opposed to a .cmd file?

And I just testet that even WinRAR works with the .cmd. I'm afraid I'm about to give up on 7zip if I don't find a solution :(

Regards,
FoLmEr

<{POST_SNAPBACK}>



Doesn't 7zip execute the install command in the directory it has just extracted to

It should.

BTW what's the advantage of using the StartX.exe method as the guide describes as opposed to a .cmd file

By using StartX.exe in combination with the /wait, you are forcing it to complete the script (run.cmd) before it continues to your next command in your batch file.

#45
DigitalAZ

DigitalAZ

    nLite Supporter

  • Member
  • Pip
  • 77 posts
  • Joined 13-September 04

KEYTOTIME u are the best. your guide is fantastic

i understood it and applied it right away without any problems.

best regards.

<{POST_SNAPBACK}>


KEYTOTIME,

I know prior MSI experience is probably required but so many have touted how easy this guide is to follow. I have tried it about 20 times with different apps .exe and.msi and cannot get one successful package. So bear with me I am going to try and hash out what I am doing and maybe some of the veterans can help me out.

Your instructions translated by a noob.
1 Download and install the latest version of 7-Zip.
Easy enough. I had 7-zip installed. (Success!)

2 Make a folder to copy all of the installation files to. If you are using a .msi include StartX.exe in the folder.

Copy all the installation files? I assumed you were referring to any files required to install the application we are trying to package. If I am using .msi I must include StartX.exe in the folder with the installation files. (Success)

3 Select all of them and right click on any file.

Select all the installation files and archive them with 7zip. (Success)

4 Select "Add to archive...", which is under the select option..
Ok...
5 You can make the archive name to whatever you want it to be. Set the compression level to Ultra.

Created "Fake Application.7z" (Success)
6 Hit OK. Once the archive is created, you can delete all files except the archive.

Delete all installation files except "Fake Application.7z" (Success)

7 Go to the 7-Zip directory and copy 7zS.sfx to the folder containing the archive.

Copied 7zS.sfx from Program Files\7-zip to folder with Fake Application.7z (Success)

8 If you want, you can change the icon of the installer by replacing the icon in 7zS.sfx using ResHacker. For example, you can use the icon from the main program. Remember to save 7zS.sfx when you're finished.

Umm assumed this was optional. Didn't do this.

9 Open Notepad and add the following:

created config.txt
;!@Install@!UTF-8!
RunProgram="StartX.exe /WAIT \"msiexec /i Fake Application.msi /qb-!\""
;!@InstallEnd@!

10 Save as config.txt with UTF-8 encoding by selecting "UTF-8" from the dropdown menu in the "Save As..." dialog in Notepad. Save it to the same folder as 7zS.sfx and the 7z archive.

Saved as UTF-8 text file in the folder with Fake Application.7z (Success)

11 The folder should now look something like this:

My folder consists of :
Fake Application.7z
config.txt
7zS.sfx

12 Open a command prompt. CD to the folder. Then enter the following command:

Typed following in cmd prompt window in folder with 3 files listed above.
copy /b 7zS.sfx + config.txt + "Fake Application.7z" "Fake Application.exe"
Your guide says 7zx.sfx I assumed it was 7zS.sfx.
7zS.sfx
config.txt
Fake Application.7z
        1 file(s) copied.

That's it, you're done. Try it out.

Launch Fake Application.exe and it extracts but displays the MSI Installer switches dialog.

When trying to create packages with the .exes I had no luck and when trying with the .msi it extracts to the temp folder and I can go into the C:\Temp\7zS4C.tmp and see the contents of my package extracted. The package however just prompts me with the Windows Installer dialog that shows you with all the switches which led me to believe I used the wrong switch. I tried several combinations from the list displayed without any success.

Any glaringly obvious mistakes I have made?

Thanks for your time :blink:

EDIT : Hrm must be a quote tag limit LOL :whistle:

#46
keytotime

keytotime

    Advanced Member

  • Member
  • PipPipPip
  • 400 posts
  • Joined 05-October 04
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@!


#47
DigitalAZ

DigitalAZ

    nLite Supporter

  • Member
  • Pip
  • 77 posts
  • Joined 13-September 04

Is the name of the app under 8 characters and has no spaces?


Ok with that knowledge I now I have working 7-zip installers! Thank you for your patience.

#48
keytotime

keytotime

    Advanced Member

  • Member
  • PipPipPip
  • 400 posts
  • Joined 05-October 04
Thank's to you i was unaware of that before. :thumbup Updated first page.

@FoLmEr.

Try this
CMDOW @ /HID
@ECHO OFF

start /wait msiexec /i IP4_1.msi MM=14 /QB-! REBOOT=ReallySuppress

REGEDIT /S ip412.reg

EXIT


#49
Astalavista

Astalavista

    MSFN loyalist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,338 posts
  • Joined 02-December 03
DigitalAZ

it u are hving problems with keytotime guide

i have a video! yes a video on how to 7zip office 2003

check the link on my sig

keytotime

u are welcome to link or use my video as a ref to making 7zip.

:)

#50
ahmedwa

ahmedwa

    Newbie

  • Member
  • 13 posts
  • Joined 16-February 04
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

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users