Monday, April 2, 2018

Principle electronic components for maintenance part 2:

Principle electronic components for maintenance part 2:

basic-electronic-components-for-maintenance

We'll resume in this article the basic electronic components needed in the process of repairing the laptop motherboard, we'll see in this article two components: the fuse and the diode, we'll discuss their functions and their failures and how to test them.

The fuse:
The-fuse

The fuse is a safety component, it protects the circuit from overcurrent, it's made of a material that melts when too much current flows through it thereby making an open circuit and stopping the current from flowing to the circuit and damages other components.

Circuit symbol:

The symbol below is used to represent a fuse in a schematic:
fuse-symbol
The letter F is used to represent a fuse.

The fuse failure:

The fuse has only one failure: shorted or cut, it acts like an open circuit and preventing the current from flowing.

How to test a fuse?

You can test the fuse using the multimeter set as ohmmeter or the simplest way set in continuity test mode.

1- Testing with continuity test mode:
fuse-testing-with-continuity-mode

Set the multimeter to continuity test mode then put each probe in one terminal of the fuse, it doesn't matter the position, it you can hear a beep that means the fuse is ok, if you don't hear a beep the fuse is shorted or cut.

2- Testing with resistance mode:

You can use the resistance mode to test a fuse if your multimeter doesn't have a continuity test mode.
Set the multimeter to resistance mode, and choose the lowest range.
Testing-fuse-with-resistance-mode

- Connect the probes to the fuse and press gently.  
- If the fuse is ok you should read a very low resistance, and if you read 1 or OL it means the fuse is shorted or cut.

Diode :
Diode

A diode is a two terminal electronic component used control the current flow by blocking it in one direction (the reverse direction) and allow it in the other one (called the diode's forward direction).

Circuit Symbol :

A diode has two terminals that are polarized, the positive terminal is called the anode and the negative one is called the cathode, current can only flow from the anode to the cathode (from + to -), the circuit symbol of a diode is:
Diode-circuit-symbol

And the letter used for diodes in circuits is D.

Characteristics of a diode:

There are some points to take into consideration when working with a diode:
- The diode doesn’t let the current flow in the forward direction until the voltage reaches 0.3 V for germanium diodes and 0.7 V for silicon diodes, this voltage is called the Forward bias Voltage and it is consumed by the diode, meaning the voltage will drop by the Forward bias voltage, example: if the voltage from a battery is 3V, it will be 2.7V after a germanium diode and 2.3V after silicon diode.
- The diode blocks the current until a certain voltage called The breakdown Voltage, after that the current will flow in the reverse direction.

Light-Emitting Diodes (LED) :
LED-Diode

A LED is a special diode that emits light when conducting current, it has the same characteristics like the normal diode, it allows the current to flow in one direction and blocks it in the other one, it has a forward bias voltage which is greater than the forward bias voltage of normal diode (from 1.2V to 3V depending on the light color that emits).

Diodes Failure:

Diodes have two types of failures: short-circuited or open-circuited (cut).
When the diode is short-circuited it acts like a wire allowing the current to flow in both directions, and when it is open-circuited or cut it acts like and open circuit and not allowing the current to flow in both directions.
Read More »

Monday, March 19, 2018

Prepare a USB flash drive to install Windows

Prepare a USB flash drive to install Windows

USB-flash-drive
Installing the operating system from a USB drive has become a very common way to install Windows, and it's often the best way to do it, because DVD can be damaged and the optical drive can't read it, this is a common problem in the installation, plus there are some notebooks that come without the optical drive and in this case you have to use the USB flash disk to install Windows.
There are many ways to prepare a USB flash drive and that depends on the Windows compatibility of the copy you want to install, you may want to install a copy compatible with the modern UEFI or the old BIOS.
There are many softwares out there that do the job almost automatically, but it's better to do it manually for many reasons:
- You extend your knowledge.
- You're in control of everything.
- The application or software might not be compatible with your system and might cause problems...etc. 

What do you need to install Windows from USB drive?

You need a USB drive with at least 8 GB capacity and the installation DVD or ISO file, yes that's all what you need.
Now let's see how to prepare the USB drive:
As we said before the process depends on the compatibility of the Windows copy you want to install, let's start with BIOS compatible one:
- Press Windows key+ R.
- Type cmd and press enter, this will bring the command prompt.
- Type diskpart then press enter, this will run diskpart a utility used to manage disks and partitions.
- Type list disk then press enter, this command will show a list of all the physical disks attached to the computer. the list associates number to each disk, make sure to identify the USB flash drive number because we'll use it in the next command.
diskpart
- Then next step is to select our USB flash drive so that all the following commands run on it, in the exemple above it's number 1, be really careful when selecting this number because the next commands will erase everything stored on the disk, so the command will be select disk 1 then press enter.
- Type clean and press enter, this will not only erase data stored on the USB drive but delete partitions as well, it's stronger than the format command.
- Type create partition primary then press enter, this will create a primary partition.
- Type select partition 1, this will select the partition created in the previous command, note that you can omit this command since there is only one partition on the USB drive.
- Type active then press enter, this will mark the partition as active, the computer must boot from an active partition, if you forget this command you'll get "No boot device available" message when booting the computer from the USB drive.
no-boot-device-available
-Type format fs=ntfs quick, this will format the USB drive using ntfs as file system and quick.
- Finally type assign then press enter and exit and press enter.
Read More »

Windows registry

Windows registry

Windows-Registry
Windows registry is a database where Windows stores its configuration data and Software's information and settings, before Windows registry settings and informations were stored on files, and each application had its own configuration files, that caused a security problem and administrating a computer was a hard task, so windows introduced the registry to centralise configuration data into one place and made them secure.
The registry is being used all the time, any modification you make is stored transparently into the appropriate Area into the registry.

How to open Windows registry editor:

Although it's not recommended to touch the registry, you need sometimes to change manually some values, Windows has a builtin editor called regedit that allows you to open the registry and edit it, warning though, this tool doesn't check what you enter, so don't change anything unless you're sure of it.
There are several ways to open regedit editor depending on the Windows version you use, I'll give you here a method that works for all Windows versions:
- Press Windows key + R.
- Type regedit then press enter.
- This will open the regedit editor.

regedit

Windows registry structure:

The registry structure is similar to folders and files structure, while a folder is a container similarly a key is a container in the registry and the value is similar to a file, keys are shown in the left side of the regedit editor window while the values of a key are shown in the right side.
There are six principle root keys in the registry:

HKEY_CLASSES_ROOT (HKCR):

Contains information about file extension correspondance, which means what program opens a specific file extension for example files with .txt extension are opened with notepad.

HKEY_CURRENT_USER (HKCU):

Contains informations and settings of the current user logged into Windows. Note that changing values in this Area affects only the logged in user.

HKEY_LOCAL_MACHINE (HKLM):

Contains computer-specific settings about hardware and softwares installed and much more, those informations concern all the users of the computer.

HKEY_USERS (HKU):

Contains informations and settings about the users of the computer.

HKEY_CURRENT_CONFIG (HKCC):

Contains informations about the current hardware  and software configuration, this key is generated at boot time and is not stored on disk.

HKEY_PERFORMANCE_DATA:

This key is not displayed in the regedit editor, it's visible through advanced control panel items such as performance monitor or through registry functions in the Windows API it contains informations about the performance provided by the kernel itself or running system drivers and services and programs.

where does Windows store the registry?

Windows registry is stored physically on disk at the location c:\windows\system32\config\, this folder contains the files associated with the registry hives as follow:

HKEY_LOCAL_MACHINE\SYSTEM: \system32\config\system

HKEY_LOCAL_MACHINE\SAM : \system32\config\sam

HKEY_LOCAL_MACHINE\SECURITY:\system32\config\security

HKEY_LOCAL_MACHINE\SOFTWARE:\system32\config\software
HKEY_USERS.DEFAULT : \system32\config\default  
Windows-registry-location
Inside this folder there is another folder called RegBack which contains another copy of the registry that you can use if you messed the original registry without making a backup copy, note that this copy is not up-to-date but it serves as a last chance to 
Read More »

Windows 7 startup

Windows 7 startup phases :
Windows7-startup-phases

From the point you press the power button until you have your Desktop loaded, Windows 7 has many steps to take.
The normal startup sequence of Windows 7 is:
1- Power-on self-test phase (POST).
2- Initial startup phase.
3- Windows boot manager phase.
4- Windows boot loader phase.
5- Kernel loading phase.
6- Long-on phase.

1- Power-on self-test phase (POST):

During that phase the computer starts executing the BIOS or UEFI program that performs the following tasks:
- Hardware initial checks such as determining the amount of RAM.
- Checks that the devices needed to start the operating system such as the hard drive are present.
- Retrieves the information stored in the CMOS.

2- Initial startup phase:

After the POST, the computer will use the boot order information stored in the CMOS to start, in case the first boot is hard disk that contains Windows 7 the first file to be loaded is Windows boot manager, a BIOS compatible Windows and UEFI compatible Windows load the windows boot manager differently:
- For BIOS compatible it starts by loading the MBR (Master Boot Record) which is located at the first sector of the hard drive and it contains a partition table (a map of the hard drive, with all its partitions) and a small boot code used to read the partition table and locate the active partition, once the active partition is located, the boot sector is read and the location of the Windows boot manager is retrieved for more information read the article BIOS/MBR boot .
- In case of UEFI compatible Windows, there is a built-in boot manager that can be configured in the setup program of the UEFI, the efi system partition contains the file needed to load windows which is something .efi (bootia32.efi ..etc) for more information read the article UEFI /GPT boot.

3- Windows boot manager phase:

During this phase the windows boot manager enables you to choose from multiple of operating systems installed, as we saw in previous articles BIOS/MBR boot and UEFI /GPT boot  that depends on the Windows version installed, in case of BIOS compatible the boot manager bootmgr will read the BCD data base to show the list of installed operating system, or in case of only one installed it wait for the user to press a key to choose advanced boot options, and in case of UEFI compatible Windows the boot manager is integrated in the UEFI itself and will consult the efi system partition to load Windows.

4- Windows boot loader phase.

The windows boot manager will then load the windows boot loader file winload.exe located in C:\windows\system32, this file will start loading Windows by doing the following:
  • Loads the kernel (Ntoskrnl.exe) but doesn’t run it.
  • Loads the Hardware Abstraction Layer (HAL), Hal.dll located in C:\windows\system32, which will be used by the kernel.
  • Loads the system registry hive (C:\Windows\System32\Config\System).
  • Loads the drivers configured to boot with the operating system but doesn’t initiate them, the list of drivers configured to be load with the operating system is found in the system registry at HKEY_LOCAL_MACHINE\SYSTEM\Services.
  • Give the control to the kernel that will start the next step.

 5- Kernel loading phase:

The Windows kernel Ntoskrnl.exe with the Hall.dll initialize a group of software features that are called the Windows executive, it also start services and drivers configured to boot with the system, and it creates the registry key HKEY_LOCAL_MACHINE\HARDWARE, which contains the hardware data collected at system startup.
After that the kernel starts the session manager (Smss.exe), a user process that continues to run until the operating system is shut down. The session manager performs many tasks such as Starting the Logon Manager (C:\System32\Winlogon.exe) which handles the next step and renaming delayed files, for example when you install an application and you’re prompt to restart your computer so that the files in use will be rename.

6- Long-on phase:

Windows logon winlogon.exe enable the user to log on and off, in addition it does the following:
  • Starts the services subsystem (services.exe) that manages services and starts all the services configured to be start with the system.
  • Starts the Local Security Authority (LSA) process (Lsass.exe).
  • Checks whether the Ctrl+Alt+Delete key combination are pressed in case the computer is part of an active directory domain.
  • The registry entry LastKnownGood (located in HKLM\SYSTEM\Select) is updated with the contents in the CurrentControlSet subkey.
  • Winlogon then starts Userinit.exe and the Windows Explorer shell.
  • Userinit.exe will then starts the applications configured to start with the operating system.
Don't forget to like us on Facebook 



Next                                                  Previous





Read More »

Friday, March 9, 2018

operations

Editing Windows registry with command line

Editing-Windows-registry-with-command-line
We saw in the article Windows registry a graphical tool (regedit.exe) integrated in Windows used to edit the registry,there is however another command line tool that offers almost all the tasks offered by regedit.exe, it is sometimes faster to edit the registry using the command line tool than using the graphical one, besides you can use the commands in scripting that can be used for automated tasks either on the local or remote computer.

Reg.exe:

The reg.exe is the command line tool that is used to deal with the registry, to use it open a command line window by clicking on start and type cmd then right click cmd and click run as administrator, this will run cmd with elevated privileges.
run-command-line-as-administrator
Reg.exe is used with operations that perform different tasks, those operations are:

Reg Query:

Used to query the registry about the subkeys and entries located under a specified subkey in the registry.
example:
To display the key, value, and data for exact and case sensitive matches of SYSTEM under the HKLM root of data type REG_SZ, type:
REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e

Reg add:

Used to add new subkey or entry to the registry.
example:
To add a registry entry to HKLM\Software\Adobe with a value named Data of type REG_BINARY and data of ac230fb, type:
REG ADD HKLM\Software\Adobe /v Data /t REG_BINARY /d ac230fb

Read More »

save

Reg.exe:

The reg.exe is the command line tool that is used to deal with the registry, to use it open a command line window by clicking on start and type cmd then right click cmd and click run as administrator, this will run cmd with elevated privileges.
run-command-line-as-administrator
Reg.exe is used with operations that perform different tasks, those operations are:

Reg Query:

Used to query the registry about the subkeys and entries located under a specified subkey in the registry.
example:
To display the key, value, and data for exact and case sensitive matches of SYSTEM under the HKLM root of data type REG_SZ, type:
REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e

Reg add:

Used to add new subkey or entry to the registry.
example:
To add a registry entry to HKLM\Software\Adobe with a value named Data of type REG_BINARY and data of ac230fb, type:
REG ADD HKLM\Software\Adobe /v Data /t REG_BINARY /d ac230fb

Reg delete:

Used to delete a subkey or entry from the registry.
Example:
To delete the registry key prog1 and its all subkeys and values, type: 
REG DELETE HKLM\Software\prog1.

Reg save:

Used to save specified subkeys, entries and values of the registry in a file and path given as parameters, if no path is given the file will be created in the current folder.
example:
To save a copy of the Adobe software type:
REG SAVE HKLM\Software\Adobe Adobebackup.hiv

Reg Compare:

Used to compare specified registry subkeys or entries.
syntax: 

reg compare <KeyName1> <KeyName2>
The return values of this operation are:
- 0: the comparison was successful and the result is identical. 
- 1: the comparison failed.
- 2: the comparison was successful and differences were found.
The following are the symbols found in the result:
=  KeyName1 data is equal to KeyName2 data.
<  KeyName1 data is less than KeyName2 data.
KeyName1 data is greater than KeyName2 data.

Reg copy: 

Used to copy a specified registry entry to another specified registry entry either on the local computer or on a remote one.
example:
To copy all values under prog1 on the local computer to prog2 on remote computer PC2 type:
REG COPY HKLM\Software\prog1 \\PC2\HKLM\Software\prog2
Read More »

Wednesday, March 7, 2018

Editing Windows registry with command line

Editing Windows registry with command line

Editing-Windows-registry-with-command-line
We saw in the article Windows registry a graphical tool (regedit.exe) integrated in Windows used to edit the registry,there is however another command line tool that offers almost all the tasks offered by regedit.exe, it is sometimes faster to edit the registry using the command line tool than using the graphical one, besides you can use the commands in scripting that can be used for automated tasks either on the local or remote computer.

Reg.exe:

The reg.exe is the command line tool that is used to deal with the registry, to use it open a command line window by clicking on start and type cmd then right click cmd and click run as administrator, this will run cmd with elevated privileges.
run-command-line-as-administrator
Reg.exe is used with operations that perform different tasks, those operations are:

Reg Query:

Used to query the registry about the subkeys and entries located under a specified subkey in the registry.
example:
To display the key, value, and data for exact and case sensitive matches of SYSTEM under the HKLM root of data type REG_SZ, type:
REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e

Reg add:

Used to add new subkey or entry to the registry.
example:
To add a registry entry to HKLM\Software\Adobe with a value named Data of type REG_BINARY and data of ac230fb, type:
REG ADD HKLM\Software\Adobe /v Data /t REG_BINARY /d ac230fb

Reg delete:

Used to delete a subkey or entry from the registry.
Example:
To delete the registry key prog1 and its all subkeys and values, type: 
REG DELETE HKLM\Software\prog1.

Reg save:

Used to save specified subkeys, entries and values of the registry in a file and path given as parameters, if no path is given the file will be created in the current folder.
example:
To save a copy of the Adobe software type:
REG SAVE HKLM\Software\Adobe Adobebackup.hiv

Reg Compare:

Used to compare specified registry subkeys or entries.
syntax: 

reg compare <KeyName1> <KeyName2>
The return values of this operation are:
- 0: the comparison was successful and the result is identical. 
- 1: the comparison failed.
- 2: the comparison was successful and differences were found.
The following are the symbols found in the result:
=  KeyName1 data is equal to KeyName2 data.
<  KeyName1 data is less than KeyName2 data.
KeyName1 data is greater than KeyName2 data.

Reg copy: 

Used to copy a specified registry entry to another specified registry entry either on the local computer or on a remote one.
example:
To copy all values under prog1 on the local computer to prog2 on remote computer PC2 type:
REG COPY HKLM\Software\prog1 \\PC2\HKLM\Software\prog2

Reg export: 

Used to make a backup to the specified subkeys, entries and values to transfer to another computer for instance or to use it later after editing the registry.
syntax:
Reg export KeyName FileName 
example: 
To export the local machine software hive and put it into softwareback.reg type:
REG EXPORT HKLM\Software softwareback.reg  

Reg import:

Is the contrary of Reg export, it's used to restore the registry using a backup file given as argument.
example: 
to restore the backup file created in the previous example type:
REG IMPORT softwareback.reg.
of course in case the backup file is not in the same folder you have to specify the complete path to the backup file.

Reg load:

Writes saved subkeys and entries into a different subkey in the registry. Intended for use with temporary files that are used for troubleshooting or editing registry entries.
Syntax: 
reg load KeyName FileName

Reg restore:

Writes saved subkeys and entries back to the registry, it's like Reg import but with Reg restore you specify the key where you want to write the file.
syntax: 
Reg restore <KeyName> <FileName>

Reg unload:

Removes a section of the registry that was loaded using the reg load operation.
syntax:
reg unload <KeyName>

Don't forget to like us on Facebook 



Next                                                  Previous

you may like to read 





Recefences:




Read More »