dobbelina Posted August 22, 2006 Posted August 22, 2006 (edited) Can regfiles be executed from sfx archives before setup runs ?I was wondering, would this work, and if so, please correct my misstakes.I add extracted installer files to an sfx rar archive.Instead of pointing the "Run after extraction" path to setup.exe, I point it to setup.cmd.In the setup.cmd I put something like this:REGEDIT /S regtweaks.regApplication.exe /SWould this work ?The reason i'm doing it is because it would be neat to have it all bundled together with the sfx archive,instead of separate regfiles.Perhaps one could even execute several bundled sfx archives (all from one) this way ?I assume those archives that are bundled in the "main archive" can't extract to a temp folder, but has to be extracted directly to a location somewhere... ?Please comment, maybe the info is here somewhere, but can't find it today Edited August 22, 2006 by dobbelina
dobbelina Posted August 22, 2006 Author Posted August 22, 2006 (edited) Ok, thanks.So there's no need to put in any exotic stuff like "start /wait" between theregfile executing and the main installer ?I mean it should execute in the order they are listed, and wait untileach entry is fully processed before going on to the next one.I think I saw something like this before:start /wait REGEDIT /S regtweaks.regApplication.exe /S Edited August 22, 2006 by dobbelina
ajua Posted August 22, 2006 Posted August 22, 2006 i always run commands with "start /wait" just to be sure everything get done without going any further with other things in the files.if you mean that you can make a BIG sfx archive with many sfx archives inside as well and every sfx with its own commands you can do that. i dont know why you want to do that but if you NEED to, then make sure you get all working because this way finding a problem or a spelling error in the commands will be very hard.
T D Posted August 22, 2006 Posted August 22, 2006 (edited) But a reg file takes seconds to write to the registry if it's under 50kb and that's still a lot of text.But to be safe, use start /wait. Edited August 22, 2006 by T D
dobbelina Posted August 23, 2006 Author Posted August 23, 2006 Ok thanks everyone for your help.Just did a few testarchives that executes from a cmd file.Works like a charm !PS. I noticed if i put "@echo off" in the beginning of the cmd file, none of the entries will be shown.Is there a way to totally disable the cmd window to come up at all ?Kinda silent type..
ajua Posted August 23, 2006 Posted August 23, 2006 use cmdow (a progra to hide the console window) search for it, i can remember where i get it. read the unattender guide, it should be there.
dobbelina Posted August 23, 2006 Author Posted August 23, 2006 (edited) I already have it (from tools archive in WPI), ehh what would I put in thecmd file to get this to work ?(an example please)I assume cmdow.exe has to be added to the archive also. Edited August 23, 2006 by dobbelina
mazin Posted August 23, 2006 Posted August 23, 2006 Put this as the first line in your CMD: cmdow @ /hidPut cmdow.exe in your system32 for global use.
T D Posted August 23, 2006 Posted August 23, 2006 Or compile the cmd into an exe with quickbfc and set it as "ghost application".
MHz Posted August 23, 2006 Posted August 23, 2006 WinRar supports more than 1 "Run after extraction" command. Add further commands in the comment.
dobbelina Posted August 24, 2006 Author Posted August 24, 2006 (edited) Put this as the first line in your CMD: cmdow @ /hidPut cmdow.exe in your system32 for global use.Ok, thanks for the tip.WinRar supports more than 1 "Run after extraction" command. Add further commands in the comment.Aha !Didn't know that that's even better.Just separate the commands with a , or ? Edited August 24, 2006 by dobbelina
MHz Posted August 24, 2006 Posted August 24, 2006 Just separate the commands with a , or ?In the comment, for example:Setup=regedit.exe /s regtweaks.regSetup=application.exeUsing the WinRar Gui, you should see the comment on the last tab when creating an SFX.
dobbelina Posted August 25, 2006 Author Posted August 25, 2006 Many thanks !Works very well. Great to know.
sk8er_boi Posted August 25, 2006 Posted August 25, 2006 Just separate the commands with a , or ?In the comment, for example:Setup=regedit.exe /s regtweaks.regSetup=application.exeUsing the WinRar Gui, you should see the comment on the last tab when creating an SFX.Whoa that was cool. I don't need that bat files anymore.Is there something with 7z sfx?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now