Jump to content

Adding password to my unattended windows


Recommended Posts

is there eny way to add password to my unattended windows cd? If I dont insert the password then I cant install the windows... and is there eny way that I can encrypt files on cd and when windows install then windows decrypt the files and install them?

Link to comment
Share on other sites


You can add real mode machine code that prompts for a password and add that code to setupldr.bin. MS allowed Royalty OEMs to do a BIOS check at this point for Windows 2000. (If you have access to the Windows 2000 OPK take a look at appendix 3 in bioslock.doc)

Link to comment
Share on other sites

Here is the information:

1. Delete the BOOTDISK directory on the CDs that ship.

2. Write real mode code that checks the BIOS on the OEM systems and prevents installation unless the OEM’s unique identifier is found. The framework code (Bioschk.asm) provided at the end of this appendix can be customized for this purpose.

3. Copy the Setupldr.bin file from the Windows 2000 OEM CD to a folder and rename Setupldr.bin to Setupldr.old.

4. At the Windows 2000 command prompt, run copy /b bioschk+setupldr.old setupldr.bin Bioschk used in the command line is the compiled form of the OEM modified version of the framwework code provided in this appendix.

5. Replace the Setupldr.bin file on the Windows 2000 CD with the new one created after the copy command.

6. Create a new Windows 2000 OEM CD.

;++
;
;Copyright (c) 2000 Microsoft Corporation
;
;Module Name:
;
; bioschk.asm
;
;Abstract:
;
; The code in this "image" is responsible for checking if it is
; appropriate for us to start setupldr.bin. We consider this appropriate
; when we pass BIOS checkings. Setupldr.bin is binary appended at the :; end of this image.
; This is provided for reference purposes only
;
;Authors:
;
; Windows 2000 OPK Development Team 16-Dec-1999
;
;Environment:
;
; Image has been loaded at 2000:0000 by ETFS boot code.
; Real mode
; DL = contains meaningful data for setupldr.bin
;
;Revision History:
;
;--
page ,132
title boot - BIOS check
name bioschk
.8086
CODE SEGMENT
ASSUME CS:CODE,DS:CODE,SS:NOTHING,ES:NOTHING
ORG 0000H
_BiosChk label byte
BiosChkDestSeg EQU 1000h
SetupLdrDestSeg EQU 2000h
MaxCodeSize EQU 0800h ;number of paragraphs (32k)
MaxSetupLdrSize EQU 4000h ;number of paragraphs (256k)
StackSeg EQU 1000h ;stack goes from here
JMPFAR MACRO DestOfs,DestSeg
db 0eah
dw OFFSET DestOfs
dw DestSeg
endm
START:
;
; set up the stack
;
mov ax,StackSeg
mov ss,ax
xor sp,sp
mov ax,cs
mov ds,ax
mov es,ax
;
; save setupldr data
;
mov Preserve, dl
; move ourselves from 2000:0000 to 1000:0000, one paragraph at a time.
mov ax, BiosChkDestSeg
mov es, ax
mov dx, MaxCodeSize
cld
Again1:
xor di, di
xor si, si
mov cx, 10h
rep movsb
mov ax, ds
inc ax
mov ds, ax
mov ax, es
inc ax
mov es, ax
dec dx
jnz Again1
mov ax, BiosChkDestSeg
mov ds, ax
mov es, ax
JMPFAR Continue1, BiosChkDestSeg
Continue1:
; insert your BIOS check code here
; instead of a real BIOS check we will check if the user holds down CTRL.
; If yes, we will behave like BIOS check failed
mov ah,02h
int 16h
and al,00000100b
jz MoveSetupLdr
; at this point, the BIOS check failed. You can add whatever code you
; want here to give a message or to make the computer crash. If you
; don't do anything, the code will jump to 2000:0000 cause an infinite
; loop. This will cause the boot process to hang.
jmp Continue2
MoveSetupLdr:
; move Setupldr code from 2000+MaxCodeSize:0000 to 2000:0000, one paragraph at a time.
push ds
push es
mov ax, SetupLdrDestSeg
mov es, ax
add ax, MaxCodeSize
mov ds, ax
mov dx, MaxSetupLdrSize
cld
Again2:
xor di, di
xor si, si
mov cx, 10h
rep movsb
mov ax, ds
inc ax
mov ds, ax
mov ax, es
inc ax
mov es, ax
dec dx
jnz Again2
pop es
pop ds
Continue2:
mov dl, Preserve
JMPFAR 0,SetupLdrDestSeg
Preserve db ?
.errnz ($-_BiosChk) GT (MaxCodeSize*16 - 2) ;FATAL: BiosChk code is too large
org MaxCodeSize*16 - 2
db 55h,0aah
CODE END
SEND START

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