Jump to content

Building a Pre-activated CD from an existing installation


Recommended Posts

@ chickenfeed,

I'm kinda new here, but i'll try and help you.

If you use the VB script from the first post on your HP, you should end up with these 5 files:

OEMBIOS.BI_

OEMBIOS.CA_

OEMBIOS.DA_

OEMBIOS.SI_

winnt.sif

The winnt.sif is very basic so you may want to edit it.

Add the 5 files to the i386 folder of your CD and burn it to a Bootable CD.

Next time you install Home, you shouldn't have to activate it. :)

@ herroyuy,

Basically Yes.

See above. :)

Edited by ZaForD
Link to comment
Share on other sites


hmm.. thanks alot for ur reply .. i just wanna make sure again cos i've tried overwriting the whole i386 folder in the cd with the i386 folder that comes together with my preactivated windows... now i realize that the 5 files are not in the i386 folder.... hehehe.. can' wait to try... shall report back after i format tomrrow.. can't format now as i have to study using power point... wt*!

Link to comment
Share on other sites

@ ZaForD

ahhhhhhhhhhhhhhhhhh I see now. so the bat file just gets data from the current windows inallation. and the vb script is to get the winxp key and place that info into the winnt file that the bat created.

man that tutorial os soooooooooooooo user unfriendly

would have it more easier if they said:

- copy the following text into notepad. name one "blah blah" and the other "blah blah" exactly.

- put in any folder both files.

- run bat file and then run vbs file.

- copy the 5 files created into the .... blah blah.

- the end.

haha thanks!

Link to comment
Share on other sites

sorry... simple question

after i get files using the batch file.... i just need to replace the 5 files i got into the xp home cd and then install? that will make my clean installation preactivated?

Yes.

Link to comment
Share on other sites

I have modified this getkey.vbs so it now adds the key to a Winnt.sif

;SetupMgrTag

[Data]
AutomaticUpdates=1
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
UnattendSwitch="Yes"
Repartition=No
Hibernation=No
OemPnPDriversPath="Drivers02_graphics;Drivers04_sound;Drivers\"
DriverSigningPolicy=Ignore
AutoActivate=Yes
TargetPath=\WINDOWS

[UserData]
ProductKey=The Script Places The Key Here

The Script

Save As Key_Sif.vbs

'/-> Varibles 
Dim Act, Dtop, Fso, KeyXP, Sif, strXPKey, Ts, VBS
'/-> Objects
Set Act = CreateObject("WScript.Shell")
Set Fso = CreateObject("Scripting.FileSystemObject")
'/-> Varibles As Objects
strXPKey = Act.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName")
KeyXP = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
Dtop = Act.SpecialFolders("Desktop")
Sif = Dtop & "\winnt.sif"
VBS = Act.ExpandEnvironmentStrings("%Systemdrive%\Key_Sif.vbs")
'/-> Get The Key
Function GetKey(rpk)
Const rpkOffset=52:i=28
szPossibleChars="BCDFGHJKMPQRTVWXY2346789"
Do
dwAccumulator=0 : j=14
Do
dwAccumulator=dwAccumulator*256
dwAccumulator=rpk(j+rpkOffset)+dwAccumulator
rpk(j+rpkOffset)=(dwAccumulator\24) and 255
dwAccumulator=dwAccumulator Mod 24
j=j-1
Loop While j>=0
i=i-1 : szProductKey=mid(szPossibleChars,dwAccumulator+1,1)&szProductKey
If (((29-i) Mod 6)=0) And (i<>-1) Then
i=i-1 : szProductKey="-"&szProductKey
End If
Loop While i>=0
GetKey=szProductKey
End Function
'/-> Make The Sif With Ket Added
Function MakeTheSif()
Set Ts = Fso.CreateTextFile(Sif)
Ts.WriteLine ";SetupMgrTag" & vbCrLf
Ts.WriteLine "[Data]"
Ts.WriteLine Space(4) & "AutomaticUpdates=1"
Ts.WriteLine Space(4) & "AutoPartition=0"
Ts.WriteLine Space(4) & "MsDosInitiated=""0"""
Ts.WriteLine Space(4) & "UnattendedInstall=""Yes""" & vbCrLf
Ts.WriteLine "[Unattended]"
Ts.WriteLine Space(4) & "UnattendMode=FullUnattended"
Ts.WriteLine Space(4) & "OemSkipEula=Yes"
Ts.WriteLine Space(4) & "OemPreinstall=Yes"
Ts.WriteLine Space(4) & "UnattendSwitch=""Yes"""
Ts.WriteLine Space(4) & "Repartition=No"
Ts.WriteLine Space(4) & "Hibernation=No"
Ts.WriteLine Space(4) & "OemPnPDriversPath=""Drivers02_graphics;Drivers04_sound;Drivers\"""
Ts.WriteLine Space(4) & "DriverSigningPolicy=Ignore"
Ts.WriteLine Space(4) & "AutoActivate=Yes"
Ts.WriteLine Space(4) & "TargetPath=\WINDOWS" & vbCrLf
Ts.WriteLine "[UserData]"
Ts.WriteLine Space(4) & "ProductKey=" & GetKey(Act.RegRead(KeyXP)) & vbCrLf
Ts.Close
Act.Run("notepad.exe " & Sif)
End Function
'/-> Deletes the VBS File
Function Cleanup()
If Fso.FileExists(VBS) Then Fso.DeleteFile(VBS) End If
End Function
'/-> Start The Script Functions
MakeTheSif : Cleanup

I have made this into a SFX that runs the above script.

Key_Sif.exe

Edited by gunsmokingman
Link to comment
Share on other sites

ok

i've tried

it's simply

just use the batch file to get the five files from ur windows... u dun even have to run the vbscript

u move all the 5 files u get fom the .bat file. then u copy all of them into the xphome cd that u are going to use to format ur comp... then ur windows shud come preactivated... as simple as that..

i've even used nlite to integrate drivers inside..

conclusion... it works! thanks bezalel

Link to comment
Share on other sites

I have modified this getkey.vbs so it now adds the key to a Winnt.sif
;SetupMgrTag

[Data]
AutomaticUpdates=1
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
UnattendSwitch="Yes"
Repartition=No
Hibernation=No
OemPnPDriversPath="Drivers\002_graphics;Drivers\004_sound;Drivers\"
DriverSigningPolicy=Ignore
AutoActivate=Yes
TargetPath=\WINDOWS

[UserData]
ProductKey=The Script Places The Key Here

The Script

Save As Key_Sif.vbs

'/-> Varibles 
Dim Act, Dtop, Fso, KeyXP, Sif, strXPKey, Ts, VBS
'/-> Objects
Set Act = CreateObject("WScript.Shell")
Set Fso = CreateObject("Scripting.FileSystemObject")
'/-> Varibles As Objects
strXPKey = Act.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName")
KeyXP = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
Dtop = Act.SpecialFolders("Desktop")
Sif = Dtop & "\winnt.sif"
VBS = Act.ExpandEnvironmentStrings("%Systemdrive%\Key_Sif.vbs")
'/-> Get The Key
Function GetKey(rpk)
Const rpkOffset=52:i=28
szPossibleChars="BCDFGHJKMPQRTVWXY2346789"
Do
dwAccumulator=0 : j=14
Do
dwAccumulator=dwAccumulator*256
dwAccumulator=rpk(j+rpkOffset)+dwAccumulator
rpk(j+rpkOffset)=(dwAccumulator\24) and 255
dwAccumulator=dwAccumulator Mod 24
j=j-1
Loop While j>=0
i=i-1 : szProductKey=mid(szPossibleChars,dwAccumulator+1,1)&szProductKey
If (((29-i) Mod 6)=0) And (i<>-1) Then
i=i-1 : szProductKey="-"&szProductKey
End If
Loop While i>=0
GetKey=szProductKey
End Function
'/-> Make The Sif With Ket Added
Function MakeTheSif()
Set Ts = Fso.CreateTextFile(Sif)
Ts.WriteLine ";SetupMgrTag" & vbCrLf
Ts.WriteLine "[Data]"
Ts.WriteLine Space(4) & "AutomaticUpdates=1"
Ts.WriteLine Space(4) & "AutoPartition=0"
Ts.WriteLine Space(4) & "MsDosInitiated=""0"""
Ts.WriteLine Space(4) & "UnattendedInstall=""Yes""" & vbCrLf
Ts.WriteLine "[Unattended]"
Ts.WriteLine Space(4) & "UnattendMode=FullUnattended"
Ts.WriteLine Space(4) & "OemSkipEula=Yes"
Ts.WriteLine Space(4) & "OemPreinstall=Yes"
Ts.WriteLine Space(4) & "UnattendSwitch=""Yes"""
Ts.WriteLine Space(4) & "Repartition=No"
Ts.WriteLine Space(4) & "Hibernation=No"
Ts.WriteLine Space(4) & "OemPnPDriversPath=""Drivers\002_graphics;Drivers\004_sound;Drivers\"""
Ts.WriteLine Space(4) & "DriverSigningPolicy=Ignore"
Ts.WriteLine Space(4) & "AutoActivate=Yes"
Ts.WriteLine Space(4) & "TargetPath=\WINDOWS" & vbCrLf
Ts.WriteLine "[UserData]"
Ts.WriteLine Space(4) & "ProductKey=" & GetKey(Act.RegRead(KeyXP)) & vbCrLf
Ts.Close
Act.Run("notepad.exe " & Sif)
End Function
'/-> Deletes the VBS File
Function Cleanup()
If Fso.FileExists(VBS) Then Fso.DeleteFile(VBS) End If
End Function
'/-> Start The Script Functions
MakeTheSif : Cleanup

I have made this into a SFX that runs the above script.

You do this well GSM,nice inc.

Cheers

MC.

Link to comment
Share on other sites

Thanks you MAVERICKS CHOICE for the nice words

Here is a HTA that I makes a Basic Winnt.sif, I have also added a RunOnceEx template maker for either a Hard Drive or CD_DVD install of app.

This is the sif it makes

;SetupMgrTag
[Data]
AutomaticUpdates=1
AutoPartition=0
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
UnattendSwitch="Yes"
Repartition=No
Hibernation=No
OemPnPDriversPath="Drivers02_graphics;Drivers04_sound;Drivers\"
DriverSigningPolicy=Ignore
AutoActivate=Yes
TargetPath=\WINDOWS

[GuiUnattended]
AdminPassword="TEST PASSWORD"
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=0
OemSkipWelcome=1

[UserData]
ProductKey=12345-ABCDE-54321-EDCBA-1A5E2
FullName="TEST USER NAME"
OrgName="TEST ORG NAME"
ComputerName=TEST COMPUTER NAME

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

[NetAdapters]
Adapter1=params.Adapter1

[params.Adapter1]
INFID=*

[NetClients]
MS_MSClient=params.MS_MSClient

[NetProtocols]
MS_TCPIP=params.MS_TCPIP

[params.MS_TCPIP]
DNS=Yes
UseDomainNameDevolution=No
EnableLMHosts=No
AdapterSections=params.MS_TCPIP.Adapter1

[params.MS_TCPIP.Adapter1]
SpecificTo=Adapter1
DHCP=Yes
WINS=No
NetBIOSOptions=2

[SystemRestore]
CheckpointCalendarFrequency=1
CheckpointSessionFrequency=12
MaximumDataStorePercentOfDisk=4
RestorePointLife=14

[Components]
Calc=On
Deskpaper=On
Dialer=Off
Dtcnetwork=Off
Fax=Off
Fp_extensions=Off
Fp_vdir_deploy=Off
Freecell=Off
Hearts=Off
Iis_ftp=Off
Iis_htmla=Off
Iis_doc=Off
Iis_inetmgr=Off
Iis_internetdataconnector=Off
Iis_nntp=Off
Iis_pwmgr=Off
Iis_serversideincludes=Off
Iis_smtp=Off
Iis_smtp_docs=Off
Iis_webadmin=Off
Iis_webdav=Off
Iis_www=Off
Iis_www_vdir_printers=Off
Iis_www_vdir_scripts=Off
Iis_www_vdir_terminalservices=Off
Indexsrv_system=Off
Inetprint=Off
Licenseserver=Off
Media_clips=On
Media_utopia=On
Minesweeper=On
Mousepoint=On
msmsgs=Off
Msnexplr=Off
Mswordpad=Off
Paint=On
Pinball=Off
Rec=On
Rootautoupdate=On
Rstorage=On
Solitaire=On
Spider=On
Templates=On
Zonegames=Off

Example RunOnceEx Hard Drive Install

cmdow @ /HID
@echo off

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

REG ADD %KEY% /V TITLE /D "The Install Section" /f

REG ADD %KEY /VE /D "Preparing Installation..." /f

:: EXAMPLE ADD REG ENTRIES TO RUNONCE CMD FOR APPS

:: REG ADD %KEY%20 /VE /D "TITLE FOR INSTALL" /f
:: REG ADD %KEY%20 /V 1 /D "REGEDIT /S %systemdrive%\Install\PLACE_FOLDER_NAME_HERE\SOME_REGFILE.reg" /f
:: REG ADD %KEY%20 /V 2 /D "%Install%\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\105 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\105 /V 1 /D "%systemdrive%\Install\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\110 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\110 /V 1 /D "%systemdrive%\Install\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\115 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\115 /V 1 /D "%systemdrive%\Install\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f


::GUNSMOKINGMAN, MAKE SURE YOU HAVE THIS FILE OR A ERROR WILL HAPPEN WHEN THIS IS RAN

REG ADD %KEY%\970 /VE /D "Preparing Final Clean up ..." /f
REG ADD %KEY%\970 /VE /D "%systemdrive%\Install\PLACE_THE CLEAN_UP_CMD_EXE_VBS_FILE_HERE" /f

Example RunOnceEx CD_DVD Install

cmdow @ /HID
@echo off

::GUNSMOKINGMAN, YOU CAN CHANGE THE CHECK FILE => %%i\Setup.exe <= TO WHAT YOU WANT
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\Setup.exe set CDROM=%%i

set App=%CDROM%Apps

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

REG ADD %KEY% /V TITLE /D "The Install Section" /f

REG ADD %KEY /VE /D "Preparing Installation..." /f

:: EXAMPLE ADD REG ENTRIES TO RUNONCE CMD FOR APPS

:: REG ADD %KEY%20 /VE /D "TITLE FOR INSTALL" /f
:: REG ADD %KEY%20 /V 1 /D "REGEDIT /S %App%\PLACE_FOLDER_NAME_HERE\SOME_REGFILE.reg" /f
:: REG ADD %KEY%20 /V 2 /D "%App%\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\105 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\105 /V 1 /D "%App%\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\110 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\110 /V 1 /D "%App%\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f

REG ADD %KEY%\115 /VE /D "PLACE_NAME_FOR_WHAT_APPEARS_ON_THE_RUNONCE_MENU" /f
REG ADD %KEY%\115 /V 1 /D "%App%\PLACE_FOLDER_NAME_HERE\PLACE_APP_NAME_INSTALL_SWITCHES_HERE" /f


::GUNSMOKINGMAN, USER MAKE SURE YOU HAVE THIS FILE OR A ERROR WILL HAPPEN WHEN THIS IS RAN

REG ADD %KEY%\970 /VE /D "Preparing Final Clean up ..." /f
REG ADD %KEY%\970 /VE /D "%App%\PLACE_THE CLEAN_UP_CMD_EXE_VBS_FILE_HERE" /f

Here is a SFX file for the HTA

GsmMkSif.exe

Edited by gunsmokingman
Link to comment
Share on other sites

  • 1 month 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...