Jump to content

Recommended Posts

Posted

i want to apply a registry tweak at the end of unattended setup. I wrote a batch file for it and save this batch file and registry tweaked file ( sys.reg) and along with "cmdlines.txt" under $OEM$ folder

in this batch file, set path=%cdrom%\$oem$

%systemroot%\regedit /s %path%\sys.reg

I tried this and it didn't work. What did i do wrong.?

thanks


Posted

is there also a "set cdrom=" command somewhere?

btw: you can just do "regedit /s %path%\sys.reg" w/o the %systemroot%

Posted
is there also a "set cdrom=" command somewhere?

btw: you can just do "regedit /s %path%\sys.reg" w/o the %systemroot%

Yes:

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 CDROM=%%i:

note that the file WIN51 must be at the root of the CD (which is the case by default, when you use ANY windows CD)

Posted

Dont use PATH as a variable name.

set path=%cdrom%\$oem$

This line in your batch will screw up your PATH, so commands like REGEDIT, REG, and FORMAT will not work normally (unless you specify the full path).

You dont need it in this case, but in future use a different name instead, for example:

set APPS=%cdrom%\$oem$\$1\Local\Apps
%APPS%\Adobe\Adobe.exe /s

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