Jump to content

Create Sfx Of Oem For Extraction Later?


durex
 Share

Recommended Posts

I know this has already been covered, but my searches werent coming up with the answer Im looking for...

I need to cut back more space on my cd and I remember someone posting a method that allows you to create an sfx of your $oem$ dir and then add a command to the winnt.sif so that it will extract before the Windows install needs anything that it contains....

Reminder anyone?

Thanks!

Link to comment
Share on other sites


Create the SFX archive anymeans you wish.

http://unattended.msfn.org/global/referenc...m#guiunattended

Use the "DetachedProgram" entry in WINNT.SIF to execute the SFX file. The DetachedProgram MUST be copied to the harddrive prior to execution, though you may just have a simple CMD file search for the CDROM then execute your desired program that way.

Link to comment
Share on other sites

Thats what I was looking for... thx Alanoll.

So to understand this better... lets say I want to archive everything thats in OEM to save space, then extract it during the install using this method... obviously I cant keep the same directory stucture I have on my CD of $OEM$\$Docs\All Users, $OEM$\$$\System 32, etc... I would actually have to replace the sub dirs of OEM with the actual folder name, correct?

IE: Instead of '$$\System 32', I would actually need to archive 'Windows\System 32' right?

Link to comment
Share on other sites

correct.

you can also use a batch file with variables to locate the files.

also, f.e., if you don't want to use the full sintax for C:\Documents and Settings\durex, to remain path and drive independant, you can rar-sfx only what is going to be on that folder and use %USERPROFILE% variable.

edit: forgot the part

IE: Instead of '$$\System 32', I would actually need to archive 'Windows\System 32' right?
instead of $$\System32 you can pack the system32 folder and extract it on %SYSTEMROOT% Edited by SiMoNsAyS
Link to comment
Share on other sites

Excellent.. couple more things... You can only call a batch file from DetachedProgram? Cant be an exe?

Also, you cant extract different items to different folders from the same SFX correct? So I would need to use 1 of 3 methods:

1. Create the entire directory structure for each OEM dir (ie: Documents and Settings\durex, Program Files, etc) and place it all in one SFX to extract to systemdrive,

2. Create multiple SFX for each OEM dir (ie: 1 for $progs to extract to Program Files, 1 for $Docs to extract to Documents and Settings, etc)

3. RAR up everything in the OEM dir and extract all the contents to a general directory and use the batch file to move stuff around.... which is what I think you are saying Simon and is the method I think im going to end up with...

Just want to get this down before I start testing...

Thanks again guys.

Link to comment
Share on other sites

I do this a little different:

I use BTS Driverpacks and use "DetachedProgram" to extract dp.exe (The DriverPacks) then when the RunOnceEx is executed I use that to extract the $oem$/$Docs/$Progs/$$.exe files (the names are different but you get the idea)

after extraction the RunOnceEx.cmd is able to continue, works perfectly for me.

Hope it helps!

Link to comment
Share on other sites

Thanks for the help guys.. while I havent tested it out, I think Ive got it all figured out...

What I did was create an SFX of the entire contents of $OEM$ (except CMDOW.exe so that the batch file will be hidden), the contents of which will be extracted to %systemdrive%\OEM when run.

I then created the following batch file, placed it in $OEM$\$1\OEM and added

DetachedProgram = "%SYSTEMDRIVE%\OEM\Run_OEM.bat"

to my Winnt.sif [GuiUnattended] section, which then executes the SFX and copies the folder contents to their designated location based on variables.

@echo off
CMDOW @ /HID

set OEMSRC=%systemdrive%\OEM

start /wait "Extracting OEM" "%OEMSRC%\OEM.exe"

XCOPY /C /E /I /H /R /Y "%OEMSRC%\$1\*" "%SYSTEMDRIVE%"
XCOPY /C /E /I /H /R /Y "%OEMSRC%\$$\*" "%WINDIR%"
XCOPY /C /E /I /H /R /Y "%OEMSRC%\$Docs\*" "%SYSTEMDRIVE%\Documents and Settings"
XCOPY /C /E /I /H /R /Y "%OEMSRC%\$Progs\*" "%PROGRAMFILES%"

CD \

RMDIR /Q /S "%OEMSRC%"

Im hoping this will do the trick. Thanks again everyone!

EDIT: Finally tested it and found you need to use XCOPY instead with a few parameters to ensure everything gets copied over. Also messed up on the syntax for copying the $Docs folder.. updated the post to reflect the changes.

Edited by durex
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...