Jump to content

How to make a 7-Zip Switchless Installer


keytotime

Recommended Posts


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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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-

Link to comment
Share on other sites

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

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.
Link to comment
Share on other sites

KEYTOTIME u are the best. your guide is fantastic

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

best regards.

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:

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...