MSFN Forum: How to make a 7-Zip Switchless Installer - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
  • 15 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

How to make a 7-Zip Switchless Installer Rate Topic: ***** 3 Votes

#41 User is offline   FoLmEr 

  • Group: Members
  • Posts: 4
  • Joined: 28-June 04

Posted 03 March 2005 - 03:52 AM

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 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,338
  • Joined: 02-December 03

Posted 03 March 2005 - 04:17 AM

KEYTOTIME u are the best. your guide is fantastic

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

best regards.

#43 User is offline   VATERNL 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 28-February 05

Posted 09 March 2005 - 11:22 AM

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 User is offline   vcBlackBox 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 22-September 04

Posted 09 March 2005 - 02:20 PM

FoLmEr, on Mar 3 2005, 03:52 AM, said:

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



Quote

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

Quote

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 User is offline   DigitalAZ 

  • nLite Supporter
  • Pip
  • Group: Members
  • Posts: 77
  • Joined: 13-September 04

  Posted 13 March 2005 - 12:35 AM

Astalavista, on Mar 3 2005, 03:17 AM, said:

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 User is offline   keytotime 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 400
  • Joined: 05-October 04

Posted 13 March 2005 - 06:25 AM

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 User is offline   DigitalAZ 

  • nLite Supporter
  • Pip
  • Group: Members
  • Posts: 77
  • Joined: 13-September 04

Posted 13 March 2005 - 11:40 AM

keytotime, on Mar 13 2005, 05:25 AM, said:

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 User is offline   keytotime 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 400
  • Joined: 05-October 04

Posted 15 March 2005 - 06:41 AM

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 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,338
  • Joined: 02-December 03

Posted 15 March 2005 - 04:56 PM

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 User is offline   ahmedwa 

  • Newbie
  • Group: Members
  • Posts: 13
  • Joined: 16-February 04

Posted 26 March 2005 - 12:26 PM

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 File(s)

  • Attached File  au3SFX.zip (688bytes)
    Number of downloads: 139


#51 User is offline   keytotime 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 400
  • Joined: 05-October 04

Posted 26 March 2005 - 08:09 PM

No idea, don't do autoit

#52 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 26 March 2005 - 09:40 PM

Is anybody interested in using the custom 7zS.sfx I made which puts the % complete on the right side of the title bar? I'll post it if there's interest.

#53 User is offline   MCT 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,290
  • Joined: 19-May 04

Posted 26 March 2005 - 11:42 PM

yes plz ryan :P

#54 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 27 March 2005 - 03:07 AM

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.

Attached File(s)

  • Attached File  7zS.zip (62.46K)
    Number of downloads: 642


#55 User is offline   MCT 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,290
  • Joined: 19-May 04

Posted 27 March 2005 - 03:20 AM

cool, only 1 prob :P u left the original icons eww :P lol

#56 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 27 March 2005 - 03:33 AM

well, it leaves it open for you to change to your liking :P

#57 User is offline   Marnic-Man 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 10-March 05

Posted 27 March 2005 - 03:43 AM

I've gotten this going so well, but say I want to taskkill a program after installing... Where would I put the takkill explorer.exe or etc..?

#58 User is offline   MCT 

  • MSFN Junkie
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,290
  • Joined: 19-May 04

Posted 27 March 2005 - 03:47 AM

look @ the beginning of this thread.. theres a guide lol

#59 User is offline   Marnic-Man 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 10-March 05

Posted 27 March 2005 - 09:08 PM

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?

#60 User is offline   DLF 

  • Member
  • PipPip
  • Group: Members
  • Posts: 206
  • Joined: 02-November 04

Posted 28 March 2005 - 03:04 AM

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?

Share this topic:


  • 15 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy