Jump to content

How to apply reg tweaks without $OEM$ ?


Recommended Posts

Hi, I am making an all in one disk, so several installation options are using the same source- 1 for regular installation, 1 for unattended, 1 for unattended with OEMPreinstall, etc. all using same install source. I would like to apply registry tweaks, as well as run a few other commands like renaming admin account, for all 3 install options, but since I only want the $OEM$ dir to be copied for the third install option, I can't use it RunOnceEx from it for the other options. Does this make sense? sorry if it's unclear. How can I run the reg tweaks from the CD, or what are other options? I know I could just use the [GUIRunOnce] section in winnt.sif, and say "REGEDIT /S D:\regtweaks.reg", but I often use alternate partitioning schemes, and D: is not always the CDrom. Thanks in advance.

Link to comment
Share on other sites


Yeah you didn't understand... I can't use %systemdrive% because I can't use the $OEM$ directory. The $OEM$ dir is full of crap to copy over if i select the option to do the OEMPreinstall. Since I'm using the same install source for the installations that i DO NOT want to copy files over...I can't use that $OEM$ folder or it will copy everythin over.

LOL is that any clearer? sorry

Link to comment
Share on other sites

Regtweak.cmd:

SET tagfile=\WIN51
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:

REGEDIT /S %CDDRIVE%\some_folder\regtweaks.reg

EXIT

The file WIN51 must be on the root of your CD

Be advised that if you want to use %CDDRIVE% every new .CMD file needs to have this line, even if the .CMD is called from .CMD that already uses this line.

SET tagfile=\WIN51
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:

Edit:

Seems Mike_Wilson was just a bit faster :D

EDIT 2:

A little modification to my post

Edited by erik_demon
Link to comment
Share on other sites

That makes sense, but I don't understand how you would run the regtweak.cmd file. Since it's on the CD & not the hdd... wouldn't you also need that "set cdrom" line in order to access it in the first place? Could you tell me specifically where to put the files, and what I should use to run them? Right now I am trying to run regtweak.cmd from winnt.sif with

[GuiRunOnce]
  \Tools\regtweak.cmd

Does "\" reference the cd root, or the hdd root when run from winnt.sif?

thanks

Link to comment
Share on other sites

Oops you are right, I missed that :blushing:

maybe you could use

SET tagfile=\WIN51
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:

and %CDDRIVE% in winnt.sif aswell (I am not sure about this)

I know that both lines do work with the RunOnceEx.cmd

Explained by MSFN

Edited by erik_demon
Link to comment
Share on other sites

yeah i tried just sticking

SET tagfile=\WIN51
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:

in winnt.sif, it didnt work- gave me all kinds of errors about "windows could not find the file 'FOR'" & crap like that.

Link to comment
Share on other sites

if all else fails, i suppose I could just make a duplicate directory of the installation source, only without all the files to be transfered, for use with this one installation- since most of it is identical to the first dir anyways, most of the extra room it takes up should get optimized away by cdimage, right?

Link to comment
Share on other sites

I'm still a fan of the floppy driven installation

that way my winnt.sif files and all the other installation can be kept on floppy

ez to edit, plus XP setup automatically looks for the winnt.sif file on the floppy

only thing is, you need to run the autologin scripting from commandlines.txt

so just modify that to point to the a:\ drive

now you can use 1 CD/DVD, and customize the installation via text changes on the floppy

including serial number, batch files, reg tweeks, username, computer name, etc.

I think you get the point

Ok, I'll stop bragging about my 1337ness :P

Link to comment
Share on other sites

I have been leaving floppy drives out of my machines for a couple years now =/

This is the first time anyone has ever even suggested that I would need one =P

EDIT: Although that is pretty

1337ness

all it takes is an old floppy lying around to make installation easier :thumbup

heck, even Dell still puts the connectors in

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