Jump to content

Gosh's Unattended Tips And Tricks


Recommended Posts


Thank you for answer

for the time being I don't intend to do multiboot, then my script will be me very useful, because I install plenty, and it saves me a lot of work.

I was having problems with the standard user's creation, but with the help of the forum I already solved.

thanks

send me email

Link to comment
Share on other sites

you are very right...I am sorry, I did not know it was already posted - I did do this myself, but yours is good, especially if it works. I use for commands cuz its what I know best. I tried to get it to not use the temp.txt but couldnt get for to do a translation on the commandline...tho ill have another look at it. update to this if you wanna use the script

for /f "tokens=3 skip=2" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath"') do set CDROM=%%i

Link to comment
Share on other sites

for /f "tokens=3 skip=2" %%i in ('reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath"') do set CDROM=%%i

Good point - you can also use "skip=2" to skip the first two lines instead of using "findstr". Whereas you're a little more flexible if you use "findstr" (because "findstr" automatically searchs for the "REG_" line) ...

However, "findstr" supports regular expressions but doesn't support sub-groups and thus it's almost useless in our case ... so your solution is fine.

Link to comment
Share on other sites

  • 1 month later...

kk, I must be dense.

I have the i386

|

---$oem$

|

-----$$

|

|-----system32

|-----source.bat

|-----source.reg

If I move the $oem$ folder to the same level as i386, it says invalid file structure, and if I move it under the i386 folder, at least install will run, just can't fInd the source.bat file.

suspect my problem is me not fully understanding the question...let alone the answer......

Any how, this is what I have...

winnt.sif

;SetupMgrTag
[Data]
Autopartition=0
MsDosInititated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEulA=Yes
OemPreinstall=Yes
TargetPath=\WINDOWS
Repartition=Yes
UnattendSwitch="No"
WaitForReboot="No"
DriverSigningPolicy=Ignore
AutoActivate=No

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=No
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1
ProfilesDir="%systemdrive%\Documents and Settings\"

[Display]
BitsPerPel=32
XResolution=1024
YResolution=768
Vrefresh=70

[UserData]
ProductKey=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
FullName="xxxxx xxxxxxxxxxx"
OrgName="xxxxxxxxxxxxxxxxx"
ComputerName=*

[TapiLocation]
Dialing=Tone
AreaCode=813

[RegionalSettings]
LanguageGroup=1
Language=00000809

[Identification]
JoinWorkgroup=WORKGROUP

[Networking]
InstallDefaultComponents=Yes

[Componants]
msmsgs=off
msnexplr=off
OEAccess=off
media_clips=off
Accessopt=off
fax=off
Clipbook=off
hypertrm=off
rec=off
pinball=off
freecell=off
minesweeper=off
solitaire=off
spider=off
hearts=off
zonegames=off

[Shell]
DefaultStartPanelOff=Yes
DefaultThemesOff=Yes

[GuiRunOnce]
Command0="%windir%\source.bat"

source.bat

reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" > %systemroot%\temp.txt
for /f "tokens=3 skip=2" %%i in (%systemroot%\temp.txt) do set CDROM=%%i
ECHO Please wait, Recovery Console is being installed locally.
%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattend
md %systemroot%\Source\i386
ECHO Please wait, source files are being copied.  This may take several minutes.
xcopy /Y /e %CDROM%\i386\*.* %systemroot%\Source\i386\
ECHO Adding registry entries.
regedit.exe /s %systemroot%\Source.reg
ECHO Done.
erase %systemroot%\source.reg
erase %systemroot%\temp.txt

source.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]
"SourcePath"="%systemroot%\\Source\\"
"ServicePackSourcePath"="%systemroot%\\Source\\"

Any help would be good....Thanks in advance.

Oh yea...its a custom boot menu off of the cdrom as well....which calls the win2k image file and then runs setup.

Link to comment
Share on other sites

  • 2 weeks later...

yes, you must be a little dense at least :)

skeeter why bother putting %profilesdir%="the default anyway" ? :rolleyes:

anyway, your $OEM$ should be parallel to the I386 folder.... inside the $OEM$ folder, please make sure you have the correct structure

$OEM$\$$\system32 is where you batch files are being placed?

then why are you running it from %windir% ??? %windir% = WINDOWS

try

Command0="%windir%\system32\source.cmd"

also, if you haven't tried already, you should really incorporate some basic drivers :D it's a must in my opinion :D

put them into $OEM$\$1\Drivers

make a folder for each driver (this folder should contain the .INF files)

then add to winnt.sif

OemPnPDriversPath="Drivers\Intel;Drivers\Via;Drivers\Nvidia;Drivers\ATI"

etc etc...

Link to comment
Share on other sites

My question is in regards to the installation of the Recovery Console to the hard drive. I added the line

%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattend

That gives me an error stating it can't find NTUPGRD.DLL. I had removed the WINNTUPG folder from I386, so I created a new CD with that folder and just NTUPGRD.DLL under my I386 folder and that error went away but I was prompted with another error referring to an INI file in that same folder. Since I am not doing any sort of upgrade and just trying to install the recovery console during RunOnceEx, why is this folder necessary to complete this task?

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 months later...

@gosh

Please bare with me, I'm a newbie, and I only found MSFN a couple of weeks ago.

I'm in the process of making a dvd using your Unattended Secret: Reducing Size Of Source, but I'd also like to incorperate your Trick #1: Make a flat.

Your "source.bat" states:

IF EXIST X:\WIN51IP.SP1 set CDROM=X:
IF EXIST Y:\WIN51IP.SP1 set CDROM=Y:
IF EXIST Z:\WIN51IP.SP1 set CDROM=Z:
ECHO Please wait, Recovery Console is being installed locally.
%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattend
md %systemroot%\Source\i386
ECHO Please wait, source files are being copied.  This may take several minutes.
xcopy /Y /e %CDROM%\i386\*.* %systemroot%\Source\i386\

Thats where my problem is, using your "reducing size of source" method removes winnt32.exe, so how do I get around this, do I copy winnt32.exe and winnt32.dll to the $$ folder, along with the .bat files, or what do I do?

Sorry to be a pain.

Link to comment
Share on other sites

  • 2 weeks later...

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