can you make a 7zip installer run a .reg file??

Questions or comments on the switchless installers? Want to create a new one? Talk about it here.
Post Reply
User avatar
cold95
Posts: 29
Joined: Mon Jan 16, 2006 10:54 pm
Location: USA, Michigan

can you make a 7zip installer run a .reg file??

Post by cold95 » Fri Jan 27, 2006 10:27 pm

im trying to make a program addon pack. one i cant release on here :cry:
but what im trying to do is make a 7zip installer that installs the program then adds the .reg file to registry. to add the serial key and stuff. im not sure how to do that, if it can be done. can anyone help?

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sat Jan 28, 2006 12:03 am

Actually it's something I've been working on in the process of making an installer for OpenOffice 2.0. With a few of my 7-Zip installers I've needed to run several command line options, not just one. What I do is make a .cmd batch file and call that in the config.txt file. I've done this with Office 2003, Microsoft AntiSpyware, and Photoshop CS2 among others.

The one thing you need to keep in mind is that 7-Zip for some reason can't call an external program that's not right in the directory where it extracts everything. So you either need to include regedit.exe or reg.exe in the installer. Reg.exe is smaller and doesn't require also adding a .reg file to import, but it requires individual lines in your batch for each registry entry.

Hopefully I'll have some time to finish this thing off over the weekend. I'll let you know how it goes.

User avatar
cold95
Posts: 29
Joined: Mon Jan 16, 2006 10:54 pm
Location: USA, Michigan

Post by cold95 » Sat Jan 28, 2006 12:13 am

ok thx for the help, give me a direction to start in. i made an Openoffice.org 2.0.1 addonpack, its in the switchless installer addons list. but i didnt have to use any reg files for it. im trying to make ones for 0&0 defrag and alcohol 120%.

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sat Jan 28, 2006 12:19 am

I'm trying to get some of the settings in OpenOffice the way I want them, and I can't seem to accomplish it through modifying the .msi file... so off I go experimenting again.

User avatar
cold95
Posts: 29
Joined: Mon Jan 16, 2006 10:54 pm
Location: USA, Michigan

Post by cold95 » Sat Jan 28, 2006 1:24 am

i need a little more help here. ive tried looking on the msfn forums but im not have any luck finding what i need. so far i go soemthing like this.

Code: Select all

CLS
@echo off
ECHO Installing Alcohol 120%
start /wait "setup.exe /s /v/qn"
ECHO.
ECHO Applying Registry Tweaks...
REGEDIT /S .\regkeys.reg
ECHO.
EXIT 
this isnt work so. is there a special thing i need to put in there for file being in the same directory and the batch script? like.

Code: Select all

 .\ setup.exe or do still have to something like
start /wait %systemdrive%\install\setup\setup.exe /s
i dont think the %systemdrive% way is right but i dont know what im suppose to put.

MarblesZA
Posts: 1
Joined: Sat Jan 28, 2006 9:37 am

Importing .Reg files

Post by MarblesZA » Sat Jan 28, 2006 9:48 am

Hey,

You could try using the REG IMPORT command which allows you to specify a .reg file to import. The syntax is simply:

REG IMPORT filename.reg

You could also add the registry keys manually in you batch file using the REG ADD command. But this is probably going to be way too much effort.

I hope this helps

User avatar
DisabledTrucker
Posts: 822
Joined: Tue Feb 22, 2005 6:14 pm
Location: Country of Mental on the Planet Trucker in the MidnightHunter Galaxy.
Contact:

Post by DisabledTrucker » Sat Jan 28, 2006 10:26 am

But how would go about doing this without using WinNT.sif though? So that it can be run from svcpack?
Matthew 22:36-40

I have some gmail invites left, if you'd like one IM me and let me know.

[url=mms://wmc1.liquidviewer.net/WNOR]WNOR FM-99[/url] The best station in the world!

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sat Jan 28, 2006 11:22 am

I must have been up too long last night. If you include RunHiddenConsole.exe in the installer and use it to launch your batch file you shouldn't have to include reg.exe or regedit.exe. I posted a guide over at MSFN on repacking using AdminStudio. You can find RunHiddenConsole.exe as an attachment in that thread.

User avatar
thuun
Posts: 61
Joined: Thu Nov 03, 2005 6:58 pm

Post by thuun » Sun Jan 29, 2006 1:11 am

You can run the Alcohol 120 .msi directly:

msiecex /i setup.msi /qn

or for 7zip sfx, add msistub and do config.txt as:

;!@Install@!UTF-8!
RunProgram="msistub setup.msi /qn"
;!@InstallEnd@!

The .msi can be modded to contain you reg info using Adminstudio or wininstall

Post Reply