Search This Blog

Sunday, April 29, 2012

Reset Windows 7 Administrator Password

There are many ways on how to reset windows 7. Assuming you have administrative rights to the windows pc in the control panel. But, what if you don't  have administrative rights? In this section we will discuss on how to reset windows seven administrator password using the open source utility called chntpw. This tutorial is purely of academic purpose only.
Here are the steps.

  1. Linux desktop in USB drive or you can use backtrack 
  2. After creating the bootable linux of debian flavor we need to install chntpw sudo apt-get install chntpw. 
  3. Open terminal 
  4.  Navigate to Windows/System32/config
  5. type chntpw -u "Administrator" SAM
  6.  At the next screen choose 1. 

Installing Windows 7 via Flash Drive


How to Create a windows 7 booting disk using flash drive

this lens' photo
Windows Seven is perhaps one of the best desktop operating system right now. It is the most widely used operating system in the whole world today. Today, I will show how to create a windows seven operating system booting flash drive.

In this tutorial we will be creating a windows 7 booting disk using flash drive. This is most useful when installing the OS to net books without dvd drive.

Here are the prerequisites:
>> 4GB Flash drive.
>> windows 7 installer

>> pc or laptop running on windows 7 or vista.

Create a windows seven booting disk

booting disk

windows 7In this tutorial we will going to create a windows 7 booting disk.

Requirements:

>> USB Flash Drive (4GB+)
>> Microsoft OS Disk (Vista / Windows 7)
>> A computer running Vista / Windows 7

STEPS 1. (Please note that we will be using the command prompt and that you need to be an administrator)
1. We will prepare the flash drive.
2. Plug in your USB Flash Drive
3. Open a command prompt as administrator (Right click on Start > All Programs > Accessories > Command Prompt and select "Run as
administrator"
4. Find the drive number of your USB Drive by typing the following into the Command Prompt window:
5. diskpart
6. list disk (you will know what drive is your flash drive thru its disk size but it is usually 1)
7. The number of your USB drive will listed. You'll need this for the next step. I'll assume that the USB flash drive is disk 1.
8. Format the drive by typing the next instructions into the same window. Replace the number "1" with the number of your disk below.
9. select disk 1
10. clean
11. create partition primary
12. select partition 1
13. active
14. format fs=NTFS
15. assign
16. exit

** Note that in our 14th step format fs=fat32 will is also ok.

STEP 2. We will make the flash drive bootable.

In the same command window that you were using in Step 1:

1. Insert your Windows Vista / 7 DVD into your drive.
2. Change directory to the DVD's boot directory where bootsect lives:
3. d:
4. cd d:\boot
5. Use bootsect to set the USB as a bootable NTFS drive prepared for a Vista/7 image. I'm assuming that your USB flash drive has been
labeled disk H:\ by the computer:
6. bootsect /nt60 h:
7. You can now close the command prompt window, we're done here.

Step 3: Copy the installation DVD to the USB drive
1. The easiest way is to use Windows explorer to copy all of the files on your DVD on to the formatted flash drive. After you've copied all of the
files the disk you are ready to go.

Step 4: Set your BIOS to boot from USB
This is where you're on your own since every computer is different. Most BIOS's allow you to hit a key at boot and select a boot option. Usually its F2, F12, del.

Hope you enjoy.

Sunday, April 1, 2012

Julian Date to Gregorian and Vice Versa

In the company I used to work we are using 2 different calendars - Gregorian and Julian. We've been using Gregorian dates for productions such as pack dates in can codes. I will not discuss further about pack dates and can codes since its beyond the scope of this tutorials. Lets begin by creating some simple TSQL.
Below TSQL Scripts will covert our @date into julian and @julian into Gregorian date. More explanations here.

DECLARE @date datetime,
       @julian char(5)

SET @date = '3/20/2012'
SET @julian = '12080'

--SELECT DATEPART(yy, @date), DATEPART(dy, @date)

--SELECT RIGHT(CAST(DATEPART(yy, @date) AS char(4)),2)

--SELECT RIGHT('000' + CAST(DATEPART(dy, @date) AS varchar(3)),3)

SELECT RIGHT(CAST(YEAR(@date) AS CHAR(4)),2) + RIGHT('000' + CAST(DATEPART(dy, @date) AS varchar(3)),3)

--SELECT LEFT(@julian,2), RIGHT(@julian,3)
--SELECT CONVERT(datetime, LEFT(@julian,2) + '0101', 112)
--SELECT DATEADD(day, CAST(RIGHT(@julian,3) AS int) - 1, CONVERT(datetime, LEFT(@julian,2) + '0101', 112))
SELECT DATEADD(day, CAST(RIGHT(@julian,3) AS int) - 1, CONVERT(datetime, LEFT(@julian,2) + '0101', 112))