Do It Yourself-Tech-Savvy way to April-07 Take A Crack

D

dfordigit

Guest
You can create windows xp unattended cd withoute using any third party utility.
Not only windows component like windows media player,Direct x,IE7 but you can integrate any program like winamp,spyboat or it may be winrar!

So get ready to spoil your hands:

:Create A Bootable XP CD That Pre-installs All Your Additional Programs:
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

1. First copy & paste your windows xp cd to C:\xpcd folder on your hard drive.
(You may use your windows xp cd with updated service packs & required drivers as done in previous month's 'Take a crack'section)

2. :$OEM$ Distribution Folders:

Now create $OEM$ sub folder in to xpcd folder> as C:\xpcd\$OEM$.

Create another subfolders in to just created $OEM$ folder:

C:\xpcd\$OEM$\$$\System32

Create folder for programms as C:\xpcd\Apps

3. Now open Notepad & copy following matter:
-----------------------------------------------------------------------------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="username"
"DefaultPassword"="userpassword"
"AutoAdminLogon"="1"
-----------------------------------------------------------------------------------------------------------------------------
Here you may replace 'username' with your name & 'userpassword'with your prefered password. Save the file naming 'autologon.reg' without quotes in to C:\xpcd\$OEM$ folder.

4. Now once again open Notepad & copy following matter:
-----------------------------------------------------------------------------------------------------------------------------
net user username userpassword /add
net localgroup Administrators username /add
net accounts /maxpwage:unlimited
REGEDIT /S autologon.reg
EXIT
-----------------------------------------------------------------------------------------------------------------------------

Here you may replace 'username' with your name & 'userpassword'with your prefered password in previous step. Save the file naming 'useraccounts.cmd' without quotes in to C:\xpcd\$OEM$ folder.

5. The next thing to do is put all your software program (.exe files) in C:\xpcd\Apps folder.In our example put Nero 6.6.0.12.exe, wrar362.exe, Firefox 2.0.0.2.exe, vlc-0.8.6-win32.exe, spybotsd14.exe and spybotsd_includes.exe in that folder.

6.Create a blank text file called CD.txt and place it in C:\xpcd folder. This allows the IF EXIST
command to scan all the drive letters specified, then when it finds CD.txt it will set an environment variable of %CDROM%
pointing to the correct drive letter.

7. Prepare RunOnceEx.cmd:

This file will contain the syntax using REG.exe to import entries into the Windows Registry. This method of importing registry entries allows the %CDROM% environment variable to be used.

Here is an example of what you can use:
--------------------------------------------------------------------------------------------------------------

cmdow @ /HID
@Echo Off

FOR %%i IN (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:\CD.txt SET CDROM=%%i:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Programs" /f

REG ADD %KEY%\005 /VE /D "NERO 6" /f
REG ADD %KEY%\005 /V 1 /D "%cdrom%\Apps\Nero 6.6.0.12.exe /silent /noreboot /no_ui /sn=1A21-0009-9030-2454-2490-4330 /write_sn" /f

REG ADD %KEY%\010 /VE /D "winrar 3.62" /f
REG ADD %KEY%\010 /V 1 /D "%cdrom%\Apps\wrar362.exe /s" /f

REG ADD %KEY%\015 /VE /D "firefox 2.0.0.2" /f
REG ADD %KEY%\015 /V 1 /D "%cdrom%\Apps\Firefox 2.0.0.2.exe /S" /f

REG ADD %KEY%\020 /VE /D "vlc media player" /f
REG ADD %KEY%\020 /V 1 /D "%cdrom%\Apps\vlc-0.8.6-win32.exe start /w vlc-0.8.6-win32.exe /L=1033 /S" /f

REG ADD %KEY%\025 /VE /D "spybot search distroy" /f
REG ADD %KEY%\025 /V 1 /D "%cdrom%\Apps\spybotsd14.exe /VERYSILENT /NORESTART /SP-" /f
REG ADD %KEY%\025 /V 2 /D "%cdrom%\Apps\spybotsd_includes.exe /S" /f

EXIT

--------------------------------------------------------------------------------------------------------------
Save this as 'RunOnceEx.cmd' without quotes in C:\XPCD\$OEM$\


You may have noticed the 5 number gaps between each registry key. This allows you to easily maintain your list by adding another application between two existing keys,Customize it as you wish. Each task is run in numerical order.


» Understanding the RunOnceEx.cmd file >>

In order to find the correct CD drive letter, we need to include some IF EXIST statements in the RunOnceEx.cmd file after @echo off:

FOR %%i IN (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:\CD.txt SET CDROM=%%i:

RunOnceEx.cmd will scan for the correct drive letter where your CD is in, sets that drive letter to the % CDROM%
environment variable, and the drive letter will be imported to the registry.

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

This sets the registry address "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" to a variable, called %KEY%. This saves on having to specify the full path everytime we use REG ADD.

REG ADD %KEY% /V TITLE /D "Installing Programs" /f

This sets the title of the Window. The wording surrounded in quotations is customizable.

REG ADD %KEY%\0025 /VE /D "spybot search distroy" /f

This sets the name of a task you want to process, and appears on the RunOnceEx window.

REG ADD %KEY%\0025 /V 1 /D "%cdrom%\Apps\spybotsd14.exe /VERYSILENT /NORESTART /SP-" /f

You can assign several tasks to "spybotsd14.exe" by using /V 1, 2, 3 and so on. like:

REG ADD %KEY%\0025 /V 2 /D "%cdrom%\Apps\spybotsd_includes.exe /S" /f

In short, all you really need to do is duplicate each REG ADD entry, but change the numbering and everything enclosed in quotations. If you want more information, for switches, type in Dos prompt *.exe /help,*.exe /? or *.exe /H for getting description of supported switches. Here '*' represents the name of your exe file.

If you are New to RunOnceEx.cmd then you have two options:

(a) Go to webpage: *unattended.msfn.org/unattended.xp/page/list/switch/ here you find many application swithes,study them. Specially for those who don't like third party app.

(b)You may download freeware utility 'RunOnceEx.cmd creator' to automatically create RunonceEx.cmd from following website:
*sourceforge.net/project/downloadin...filename=setup2.6.1.0_RC3.exe&use_mirror=nchc

8. To start RunOnceEx on first logon, we will need to import the registry keys during GUI-mode of Windows Setup. We can do
this by using cmdlines.txt which executes a series of commands during the T-12 minute stage of Windows XP Setup. Open Notepad and paste in the following text:
-----------------------------------------------------------------------------------------------------------------------------
[COMMANDS]
"useraccounts.cmd"
"RunOnceEx.cmd"
-----------------------------------------------------------------------------------------------------------------------------
Save this as 'cmdlines.txt' without quotes inside the $OEM$ folder within C:\xpcd\$OEM$.

9. cmdow.exe is a tool designed to hide command line window from the end user, you can get cmdow.exe freeware from:
*www.commandline.co.uk/cmdow/cmdow.zip. Place cmdow.exe into the C:\xpcd\$OEM$\$$\System32 directory, so cmdow is copied over during Setup and then the tool can be executed from anywhere.

Note: If you dont like to use third party app than simply bypass this step and remove first line from RunonceEx.cmd (created in step 7) i.e 'cmdow @. /HID'.

10.unattended installation of OEM xp cd:

(A) From xpcd folder navigate>support>tools>deploy.cab.Extract deploy.cab to hard disk.Now double click the file'setupmagr.exe' from just extracted files. Click 'next'>select 'create new' then 'next'>select 'unattended setup' & click next>select windows xp pro & click next>select fully automated & click 'next'>select 'setup from cd' & click 'next'>accept the agreement & click next.

(B) Now under General settings fill name & organisation,Display settings,Time zone,Product key.

(c) Under network & advanced settings you may keep default settings,specially administrator password field sholud be kept empty as it has been already done in 'useraccounts.cmd'.

(D)After you are done,click the 'finish' button & save the answer file as 'winnt.sif' when promted.

(E) Now open just created winnt.sif file in notepad.Now under [Data] column change value of AutoPartition to 0 which will enable you to select/format HDD partitions while installing windows.Now under [unattended] column change value of 'OemPreinstall' to 'Yes'.Under [GuiUnattended] tab add AutoLogon=Yes and AutoLogonCount=1.
Remove the [GuiRunOnce] entries in winnt.sif if it is there, as RunOnceEx can be used to replace [GuiRunOnce] completely.

You can check ref.chm in the Deployment Tools for many other values you might want to use.

Save the file to 'C:\xpcd\I386'.

11.:create bootable windows xp cd:

(A)You need to download boot sector of the windows xp cd from:

*www.tacktech.com/pub/microsoft/bootfiles/bootfiles.zip

Extract the boot sector file to a folder.This will be used with Nero to create bootable disk.

(B)Launch Nero & select CD-Rom (Boot) from 'New compilation' dialog box.Under the 'Boot' tab specify the bootsector file which you extracted.Set the Emulation as 'No emulation' & keep the boot message blank.Most importantly, set the 'Numbers of loaded sectors' as 4.Under ISO tab select Mode 1,ISO 9660+Joliet,max of 11 chars,ISO 9660(standard ISO CD_ROM),& tick all relax restrictions. Select 24x write speed & Disk at once method.

(C) Drag in all inside contents of xpcd folder on your C drive & click Burn.

That's all! Your windows xp unattended cd with your additional programs is ready!


NOTE: All programs will run from CD'S Apps folder.

BY this method you will learn more things, so if you are tech-savvy then go on with this method. Update your knowledge & say good buy to ready made software!

Your feedback in the matter highly apperciable.

Note: you may see my attached files for clarity.
 
Last edited by a moderator:
OP
D

dfordigit

Guest
I herewith enclose screenshots to better understand OEM folder layout.

I have clearly mentioned links not only from MSFN, there are others too in my writeup!

Furthermore akuCRACKER,You might have notice that I have modified folder structure for app & tried to simplify whole procedure with correct 11 steps.It will be useful for those persons who are trying this for first time.By following or even copying these 11 steps exactly anyone can easily do the job.
 
Last edited by a moderator:

nihu

Broken In
previously I had tried runonce.cmd for integrating softwares,but it has failed.
But with your tutorial I finally made it!

Thanks !thanks!
Thanks !thanks!

KEEP IT UP!
 

xlynx

Right off the assembly line
thank dud ...........................................................................................................................
 
Top Bottom