Saturday, April 30, 2022

Set up gmail in outlook using app password

You might receive an error saying, "unable to connect to your outgoing server" while setting up a gmail account in outlook even when your gmail account password you have entered is correct.

This is due to new settings in gmail account, which required you to enable 2FA in your account and allow you to set up a password to access your gmail account via smtp or any application client like outlook.

Follow below steps to do set up your gmail account in outlook 2016:

1. Login to your gmail account and set up 2fa, you may visit below link Google Less secure apps (login using your gmail account you would like to configure in outlook), click back(<--) and you will see the settings:

2. Make sure that you have enabled 2FA as per below screenshot.

3. Click on App passwords, select App as Mail and device as Windows Computer.
4. Click on generate, it will generate a string password, copy it (it can be used as a password while setting up other apps to access your gmail account).

5. Open your outlook, click on File>Add account, fill up the account information and paste the password copied from previous step(step 4), click on next.



It will set up your outlook with your gmail account.

Wednesday, April 6, 2022

Basics of git, create, update and collaborate code using git

Git is version control tool for track, monitor and collaborate code. and it does not require codeing and is useful for developers, designer, project managers, students, teachers and  for anyone who would like to learn.

Core competencies:

1. Prerequisite - Bash terminal and a text editor

2. Important terminal commands

3. Git commands and using git locally

4. git remotes and github

Installation:

MaC OS:

Open terminal and run below command

$xcode-select --install

It will pop up a message to install xcode command line tool, click on install and agree.

To test it run the command "git" on the terminal and you will see below which shows that the git has been installed.

Linux/Ubuntu:

To install git on Linux run below command:

$ sudo apt-get update 

$ sudo apt-get install git

$ git --version

Download and install sublime text or any of your favorite text editor.

Windows:

To install for windows OS follow the link Git - Downloading Package (git-scm.com).

Basic terminal commands will be used:

pwd- check the current directory

ls - list directories 

cd - Change Direcotry

touch- create file

mkdir- create directory

Create first git repository:

$mkdir GitProject1 //create folder GitProject

$cd GitProject1 //to change local directory to GitProject1

$touch myFile.txt //create an empty file

Open the file myFile.txt in your favourite editor and write some text and save it, we will be using vi editor to dot it:


$vi myFile.txt

//Press i in the keyboard after above command to make it insert mode and type "Hello World". Press Esc+:x and press enter the file will be saved.

Below is the file content:


Now run the command git init from inside the GitProject1 directory

1. git init: to initialize a git repository.



Run below command to see the git folders initialized under GitProject1 directory

$ls -a 



As we were successfully able to initialize git repository, now we will use below commands for further actions:

1. git status : to check the status of the git repository, what branch you are on and tracked/un-tracked files.

We can see we have one un-tracked file myFile.txt which we will be tracking.



2. git add : to add the file to the staging for tracking purpose

As you can see, the file is added to the staging, now we can run the status command to see the tracking status.


From the above screenshot, you can see that we have changes to be committed under the file myFile.txt.

3. git commit -m "initial-commit" : to commit the changes




4. git log: to check the latest commits and the changes made to the repository


5. Making an update to existing file
Open the file in your preferred editor and update the file, we have used vi editor.

Once the changes are updated in the file, run the command get status to verify the changes to be staged.
 



As we have made changes to the file, we need to run git add command to add these changes to the staging.
After adding the file for the changes, we can run the status command again to see that the changes are ready to commit.
Next run the commit command and check the status of the file.








At the end we can run the git log command to see the changes/commits made to the project as per above screenshot.

Sunday, April 3, 2022

How to enable telnet in windows

 Telnet command is not by default enabled sometimes in Windows. In order to enable telnet command, please follow below steps:

1. Click on Start button and search for "Turn windows features On or ff" , right click it and select run as administrator


2. Make sure you mark "Telnet client" from the list and click on OK.



3. Restart the computer

4. To confirm, open command prompt and type telnet and hit enter to make sure it is enabled after the changes




How to check if the port is up or a service is running command line Windows and UNIX

In order to check for service status we have below 2 options to check. You need to have the host name and port number to check if the port is running.

Windows: From the source system/server follow below steps:

a. Open command prompt by clicking start button and click on command prompt

b. Type below command and hit enter

telnet host_ip/hostname port_number

Ex: telnet 10.10.10.12 80

Host ip is the ip address of the server/computer where the service is running and port number is the actual port number assigned to the service.

After running the command if you see a blank screen, the port is up and the service is running.


If you do see unable to connect message means either service is not up or the source server is not able to reach to the destination. Try to use tracert command to figure out.


If you receive telnet command not found, click on below link to install telnet command on Windows.

TroubleShooting: How to enable telnet in windows (aksanswer.blogspot.com)

Unix: For unix, run the same command

telnet destination_ip/host_name port_number

Ex: telnet 100.200.1.1 8080

If telnet command not found, please check corresponding unix/linux installation procedure and try the same once the telnet command is installed.

 

How to kill java process in windows and unix

Sometimes, there are multiple java threads executed and might get hang, in order to kill them all together, below are the provided steps:

Windows:

a. Open command prompt as admin: click on Windows button and type "cmd", right click and select run as administrator


b. Once the command prompt is open type below command and hit enter

taskkill /im java.exe


It will terminate all the java.exe programs running in the Winows.

Unix:

Below are 2 ways to kill the java process:

a. To kill all java processes

pkill -f 'java -jar'

b. To find all the java processes

ps -ef | grep java

Once found the list of java process it can be killed by kill command by providing process id

kill -9 process_id 

Process_id is from the previous command



Sunday, March 13, 2022

Unix menu script example, shell script example for menu driven options

Below example demonstrates how to create a menu driven shell script, it allows user to select options from the menu or a list of options.

Steps to run in the unix.

1. Write or copy below program in a text editor and save as extension .sh (ex favColour.sh).

2. Make it executable (for ex chmod u+x favColour.sh, user should be able to run it)

3. Run the program by typing ./favColour.sh




#!/bin/bash

# menu driven shell script
echo "Choose your favourite colour";
echo "1. Green"
echo "2. Blue"
echo "3. Black"
echo "4. Yellow"
echo "5. Exit"
echo -n "Enter your menu choice [1-5]: "
# Running a loop until user choose to select exit
while :
do
# reading option
read option
# case statement is used to compare one value with the multiple cases.
case $option in
  # option 1
  1)  echo "You have selected the option 1"
      echo "Selected colour is Green. ";;
  # option 2
  2)  echo "You have selected the option 2"
      echo "Selected colour is Blue. ";;
  # option 3
  3)  echo "You have selected the option 3"
      echo "Selected colour is Black. ";;    
  # option 4
  4)  echo "You have selected the option 4"
      echo "Selected colour is Yellow. ";;  
  # option 5
  5)  echo "Exit ..."
      exit;;
  # Default Pattern
  *) echo "Please choose correct option";;
esac
  echo -n "Enter your option [1-5]: "

done

Saturday, March 12, 2022

Most useful windows shortcuts, all you need to know

Windows Operating system provides a list of shortcut keys or keyboard shortcut to make life easier while working, below is a list of most useful windows commands that may help you in day to day life. 

Run prompt shortcuts: You may run below commands from run prompt.

Open run prompt by clicking start button and search for run.

Or you you may press Windows+R for opening Run prompt.

Once you open run prompt, you can type below shortcut commands and press enter to open the dialogue box.

compmgmt.msc - Computer management
devmgmt.msc - Device manager
diskmgmt.msc - Disk management
dfrg.msc - Disk defrag
eventvwr.msc - Event viewer
fsmgmt.msc - Shared folders
gpedit.msc - Group policies
lusrmgr.msc - Local users and groups
perfmon.msc - Performance monitor
rsop.msc - Resultant set of policies
secpol.msc - Local security settings
services.msc - Various Services
msconfig - System Configuration Utility
regedit - Registry Editor
msinfo32 - System Information
sysedit - System Edit
win.ini - windows loading information(also system.ini)
winver - Shows current version of windows
mailto: - Opens default email client
command - Opens command prompt
appwiz.cpl - Add/Remove Programs control 
timedate.cpl - Date/Time Properties control 
desk.cpl - Display Properties control 
findfast.cpl - FindFast control 
fonts - Fonts Folder control 
inetcpl.cpl - Internet Properties control 
main.cpl - Keyboard Properties control keyboard
main.cpl - Mouse Properties control 
mmsys.cpl - Multimedia Properties control 
netcpl.cpl - Network Properties control 
password.cpl - Password Properties control 
Printers Folder control printers
mmsys.cpl - Sound Properties control sounds
sysdm.cpl - System Properties control 

Command Prompt: Below commands are used in command prompt for performing any task/working in command prompt.

Click start button and search for cmd, click on CMD and it will open a windows terminal.

You may further type the windows commands.

ANSI.SYS Defines functions that change display graphics, control cursor movement, and reassign keys.

APPEND Causes MS-DOS to look in other directories when editing a file or running a command.

ARP Displays, adds, and removes arp information from network devices.

ASSIGN Assign a drive letter to an alternate letter.
ASSOC View the file associations.
AT Schedule a time to execute commands or programs.
ATMADM Lists connections and addresses seen by Windows ATM call manager.
ATTRIB Display and change file attributes.
BATCH Recovery console command that executes a series of commands in a file.
BOOTCFG Recovery console command that allows a user to view, modify, and rebuild the boot.ini
BREAK Enable / disable CTRL + C feature.
CACLS View and modify file ACL's.
CALL Calls a batch file from another batch file.
CD Changes directories.
CHCP Supplement the International keyboard and character set information.
CHDIR Changes directories.
CHKDSK Check the hard disk drive running FAT for errors.
CHKNTFS Check the hard disk drive running NTFS for errors.
CHOICE Specify a listing of multiple options within a batch file.
CLS Clears the screen.
CMD Opens the command interpreter.
COLOR Easily change the foreground and background color of the MS-DOS window.
COMP Compares files.
COMPACT Compresses and uncompress files.
CONTROL Open control panel icons from the MS-DOS prompt.
CONVERT Convert FAT to NTFS.
COPY Copy one or more files to an alternate location.
CTTY Change the computers input/output devices.
DATE View or change the systems date.
DEBUG Debug utility to create assembly programs to modify hardware settings.
DEFRAG Re-arrange the hard disk drive to help with loading programs.
DEL Deletes one or more files.
DELETE Recovery console command that deletes a file.
DELTREE Deletes one or more files and/or directories.
DIR List the contents of one or more directory.
DISABLE Recovery console command that disables Windows system services or drivers.
DISKCOMP Compare a disk with another disk.
DISKCOPY Copy the contents of one disk and place them on another disk.
DOSKEY Command to view and execute commands that have been run in the past.
DOSSHELL A GUI to help with early MS-DOS users.
DRIVPARM Enables overwrite of original device drivers.
ECHO Displays messages and enables and disables echo.
EDIT View and edit files.
EDLIN View and edit files.
EMM386 Load extended Memory Manager.
ENABLE Recovery console command to enable a disable service or driver.
ENDLOCAL Stops the localization of the environment changes enabled by the setlocal command.
ERASE Erase files from computer.
EXIT Exit from the command interpreter.
EXPAND Expand a M*cros*ft Windows file back to it's original format.
EXTRACT Extract files from the M*cros*ft Windows cabinets.
FASTHELP Displays a listing of MS-DOS commands and information about them.
FC Compare files.
FDISK Utility used to create partitions on the hard disk drive.
FIND Search for text within a file.
FINDSTR Searches for a string of text within a file.
FIXBOOT Writes a new boot sector.
FIXMBR Writes a new boot record to a disk drive.
FOR Boolean used in batch files.
FORMAT Command to erase and prepare a disk drive.
FTP Command to connect and operate on a FTP server.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Moves a batch file to a specific label or location.
GRAFTABL Show extended characters in graphics mode.
HELP Display a listing of commands and brief explanation.
IF Allows for batch files to perform conditional processing.
IFSHLP.SYS 32-bit file manager.
IPCONFIG Network command to view network adapter settings and assigned values.
KEYB Change layout of keyboard.
LABEL Change the label of a disk drive.
LH Load a device driver in to high memory.
LISTSVC Recovery console command that displays the services and drivers.
LOADFIX Load a program above the first 64k.
LOADHIGH Load a device driver in to high memory.
LOCK Lock the hard disk drive.
LOGON Recovery console command to list installations and enable administrator login.
MAP Displays the device name of a drive.
MD Command to create a new directory.
MEM Display memory on system.
MKDIR Command to create a new directory.
MODE Modify the port or display settings.
MORE Display one page at a time.
MOVE Move one or more files from one directory to another directory.
MSAV Early M*cros*ft Virus scanner.
MSD Diagnostics utility.
MSCDEX Utility used to load and provide access to the CD-ROM.
NBTSTAT Displays protocol statistics and current TCP/IP connections using NBT
NET Update, fix, or view the network or network settings
NETSH Configure dynamic and static network information from MS-DOS.
NETSTAT Display the TCP/IP network protocol statistics and information.
NLSFUNC Load country specific information.
NSLOOKUP Look up an IP address of a domain or host on a network.
PATH View and modify the computers path location.
PATHPING View and locate locations of network latency.
PAUSE Command used in batch files to stop the processing of a command.
PING Test / send information to another network computer or network device.
POPD Changes to the directory or network path stored by the pushd command.
POWER Conserve power with computer portables.
PRINT Prints data to a printer port.
PROMPT View and change the MS-DOS prompt.
PUSHD Stores a directory or network path in memory so it can be returned to at any time.
QBASIC Open the QBasic.
RD Removes an empty directory.
REN Renames a file or directory.
RENAME Renames a file or directory.
RMDIR Removes an empty directory.
ROUTE View and configure windows network route tables.
RUNAS Enables a user to execute a program on another computer.
SCANDISK Run the scandisk utility.
SCANREG Scan registry and recover registry from errors.
SET Change one variable or string to another.
SETLOCAL Enables local environments to be changed without affecting anything else.
SETVER Change MS-DOS version to trick older MS-DOS programs.
SHARE Installs support for file sharing and locking capabilities.
SHIFT Changes the position of replaceable parameters in a batch program.
SHUTDOWN Shutdown the computer from the MS-DOS prompt.
SMARTDRV Create a disk cache in conventional memory or extended memory.
SORT Sorts the input and displays the output to the screen.
START Start a separate window in Windows from the MS-DOS prompt.
SUBST Substitute a folder on your computer for another drive letter.
SWITCHES Remove add functions from MS-DOS.
SYS Transfer system files to disk drive.
TELNET Telnet to another computer / device from the prompt.
TIME View or modify the system time.
TITLE Change the title of their MS-DOS window.
TRACERT Visually view a network packets route across a network.
TREE View a visual tree of the hard disk drive.
TYPE Display the contents of a file.
UNDELETE Undelete a file that has been deleted.
UNFORMAT Unformat a hard disk drive.
UNLOCK Unlock a disk drive.
VER Display the version information.
VERIFY Enables or disables the feature to determine if files have been written properly.
VOL Displays the volume information about the designated drive.
XCOPY Copy multiple files, directories, and/or drives from one location to another.
TRUENAME When placed before a file, will display the whole directory in which it exists
TASKKILL It allows you to kill those unneeded or locked up applications
Windows Shortcuts: Windows shortcuts are used to make the things easy, you may press the combination of keys to open dialogue box or to perform a particular task.
ALT+- (ALT+hyphen) Displays the Multiple Document Interface (MDI) child window's System menu
ALT+ENTER View properties for the selected item
ALT+ESC Cycle through items in the order they were opened
ALT+F4 Close the active item, or quit the active program
ALT+SPACEBAR Display the System menu for the active window
ALT+TAB Switch between open items
ALT+Underlined letter Display the corresponding menu
BACKSPACE View the folder one level up in My Computer or Windows Explorer
CTRL+A Select all
CTRL+B Bold
CTRL+C Copy
CTRL+I Italics
CTRL+O Open an item
CTRL+U Underline
CTRL+V Paste
CTRL+X Cut
CTRL+Z Undo
CTRL+F4 Close the active document
CTRL while dragging Copy selected item
CTRL+SHIFT while dragging Create shortcut to selected iteM
CTRL+RIGHT ARROW Move the insertion point to the beginning of the next word
CTRL+LEFT ARROW Move the insertion point to the beginning of the previous word
CTRL+DOWN ARROW Move the insertion point to the beginning of the next paragraph
CTRL+UP ARROW Move the insertion point to the beginning of the previous paragraph
SHIFT+DELETE Delete selected item permanently without placing the item in the Recycle Bin
ESC Cancel the current task
F1 Displays Help
F2 Rename selected item
F3 Search for a file or folder
F4 Display the Address bar list in My Computer or Windows Explorer
F5 Refresh the active window
F6 Cycle through screen elements in a window or on the desktop
F10 Activate the menu bar in the active program
SHIFT+F10 Display the shortcut menu for the selected item
CTRL+ESC Display the Start menu
SHIFT+CTRL+ESC Launches Task Manager
SHIFT when you insert a CD Prevent the CD from automatically playing
WIN Display or hide the Start menu
WIN+BREAK Display the System Properties dialog box
WIN+D Minimizes all Windows and shows the Desktop
WIN+E Open Windows Explorer
WIN+F Search for a file or folder
WIN+F+CTRL Search for computers
WIN+L Locks the desktop
WIN+M Minimize or restore all windows
WIN+R Open the Run dialog box
WIN+TAB Switch between open items
Windows Explorer Shortcuts: (Windows+E to open windows explorer)
ALT+SPACEBAR - Display the current window’s system menu
SHIFT+F10 - Display the item's context menu
CTRL+ESC - Display the Start menu
ALT+TAB - Switch to the window you last used
ALT+F4 - Close the current window or quit
CTRL+A - Select all items
CTRL+X - Cut selected item(s)
CTRL+C - Copy selected item(s)
CTRL+V - Paste item(s)
CTRL+Z - Undo last action
CTRL+(+) - Automatically resize the columns in the right hand pane
TAB - Move forward through options
ALT+RIGHT ARROW - Move forward to a previous view
ALT+LEFT ARROW - Move backward to a previous view
SHIFT+DELETE - Delete an item immediately
BACKSPACE - View the folder one level up
ALT+ENTER - View an item’s properties
F10 - Activate the menu bar in programs
F6 - Switch between left and right panes
F5 - Refresh window contents
F3 - Display Find application
F2 - Rename selected item
Internet Explorer Shortcuts:
CTRL+A - Select all items on the current page
CTRL+D - Add the current page to your Favorites
CTRL+E - Open the Search bar
CTRL+F - Find on this page
CTRL+H - Open the History bar
CTRL+I - Open the Favorites bar
CTRL+N - Open a new window
CTRL+O - Go to a new location
CTRL+P - Print the current page or active frame
CTRL+S - Save the current page
CTRL+W - Close current browser window
CTRL+ENTER - Adds the http://www. (url) .com
SHIFT+CLICK - Open link in new window
BACKSPACE - Go to the previous page
ALT+HOME - Go to your Home page
HOME - Move to the beginning of a document
TAB - Move forward through items on a page
END - Move to the end of a document
ESC - Stop downloading a page
F11 - Toggle full-screen view
F5 - Refresh the current page
F4 - Display list of typed addresses
F6 - Change Address bar and page focus
ALT+RIGHT ARROW - Go to the next page
SHIFT+CTRL+TAB - Move back between frames
SHIFT+F10 - Display a shortcut menu for a link
SHIFT+TAB - Move back through the items on a page
CTRL+TAB - Move forward between frames
CTRL+C - Copy selected items to the clipboard
CTRL+V - Insert contents of the clipboard
ENTER - Activate a selected link
HOME - Move to the beginning of a document
END - Move to the end of a document
F1 - Display Internet Explorer Help

23 Ways to speed up Windows performance

Since defragmentation of the disk will not do much to improve Windows performance, here are 23 suggestions that will. Each can enhance the performance and reliability of your customers' PCs. Best of all, most of them will cost you nothing. 

1. To decrease a system's boot time and increase system performance, use the money you save by not buying defragmentation software -- the built-in Windows defragmenter works just fine -- and instead equip the computer with an Ultra-133 or Serial ATA hard drive with 8-MB cache buffer.

2. If a PC has less than 512 MB of RAM, add more memory. This is a relatively inexpensive and easy upgrade that can dramatically improve system performance.

3. Ensure that Windows is utilizing the NTFS file system. If you're not sure,  here's how to check: First, double-click the My Computer icon, right-click on the  C: Drive, then select Properties. Next, examine the File System type; if it says FAT32,  then back-up any important data. Next, click Start, click Run, type CMD, and then click OK. At the prompt, type CONVERT C: /FS:NTFS and press the Enter key. This process may take a while; it's important that the computer be uninterrupted and virus-free. The file system used by the bootable drive will be either FAT32 or NTFS. I highly recommend NTFS for its superior security, reliability, and efficiency with larger disk drives.

4. Disable file indexing. The indexing service extracts information from documents and other files on the hard drive and creates a "searchable keyword index." As you can  imagine, this process can be quite taxing on any system.

The idea is that the user can search for a word, phrase, or property inside a document, should they have hundreds or thousands of documents and not know the file name of the document they want. Windows built-in search functionality can still perform these kinds of searches without the Indexing service. It just takes longer. The OS has to open  each file at the time of the request to help find what the user is looking for.

Most people never need this feature of search. Those who do are typically in a large corporate environment where thousands of documents are located on at least one server. But if you're a typical system builder, most of your clients are small and medium  businesses. And if your clients have no need for this search feature, I recommend disabling it.

Here's how: First, double-click the My Computer icon. Next, right-click on the C: Drive, then select Properties. Uncheck "Allow Indexing Service to index this disk for  fast file searching." Next, apply changes to "C: subfolders and files," and click OK.  If a warning or error message appears (such as "Access is denied"), click the Ignore All  button.

5. Update the PC's video and motherboard chipset drivers. Also, update and configure the  BIOS. 

6. Empty the Windows Prefetch folder every three months or so. Windows can "prefetch" portions of data and applications that are used frequently. This makes processes appear to load faster when called upon by the user. That's fine. But over time, the prefetch  folder may become overloaded with references to files and applications no longer in use.  When that happens, Windows is wasting time, and slowing system performance, by pre-loading them. Nothing critical is in this folder, and the entire contents are safe to delete.

7. Once a month, run a disk cleanup. Here's how: Double-click the My Computer icon. Then right-click on the C: drive and select Properties. Click the Disk Cleanup button it's just to the right of the Capacity pie graph -- and delete all temporary files.

8. In your Device Manager, double-click on the IDE ATA/ATAPI Controllers device, and ensure that DMA is enabled for each drive you have connected to the Primary and Secondary controller. Do this by double-clicking on Primary IDE Channel. Then click the Advanced Settings tab. Ensure the Transfer Mode is set to "DMA if available" for  both Device 0 and Device 1. Then repeat this process with the Secondary IDE Channel.

9. Upgrade the cabling. As hard-drive technology improves, the cabling requirements to achieve these performance boosts have become more stringent. Be sure to use 80-wire  Ultra-133 cables on all of your IDE devices with the connectors properly assigned to the matching Master/Slave/Motherboard sockets. A single device must be at the end of the cable; connecting a single drive to the middle connector on a ribbon cable will cause signaling problems. With Ultra DMA hard drives, these signaling problems will prevent the drive from performing at its maximum potential. Also, because these cables inherently support "cable select," the location of each drive on the cable is important. For these  reasons, the cable is designed so drive positioning is explicitly clear.

10. Remove all spyware from the computer. Use free programs such as AdAware by Lavasoft  or Spy Bot Search & Destroy. Once these programs are installed, be sure to check for and download any updates before starting your search. Anything either program finds can  be safely removed. Any free software that requires spyware to run will no longer function once the spyware portion has been removed; if your customer really wants the program even though it contains spyware, simply reinstall it. For more information on removing Spyware  visit this Web Pro News page.

11. Remove any unnecessary programs and/or items from Windows Startup routine using the MSCONFIG utility. Here's how: First, click Start, click Run, type MSCONFIG, and click OK.  Click the Start Up tab, then uncheck any items you don't want to start when Windows starts. Unsure what some items are? Visit the Windows Tasks Process Library. It contains  known system processes, applications, as well as spyware references and explanations.  Or quickly identify them by searching for the filenames using Google or another Web search engine.

12. Remove any unnecessary or unused programs from the Add/Remove Programs section of the Control Panel.

13. Turn off any and all unnecessary animations, and disable active desktop. In fact, for optimal performance, turn off all animations. Windows offers many different settings in this area. Here's how to do it: First click on the System icon in the Control Panel. Next, click on the Advanced tab. Select the Settings button located under Performance. Feel free to play around with the options offered here, as nothing you can change will alter the reliability of the computer only its responsiveness.

14. If your customer is an advanced user who is comfortable editing their registry, try some of the performance registry tweaks offered at Tweak XP.

15. Visit Microsoft's Windows update site regularly, and download all updates labeled Critical. Download any optional updates at your discretion.

16. Update the customer's anti-virus software on a weekly, even daily, basis. Make sure they have only one anti-virus software package installed. Mixing anti-virus software  is a sure way to spell disaster for performance and reliability.

17. Make sure the customer has fewer than 500 type fonts installed on their computer. The more fonts they have, the slower the system will become. While Windows handles fonts much more efficiently than did the previous versions of Windows, too many fonts, that is, anything over 500, will noticeably tax the system.

18. Do not partition the hard drive. Windows NTFS file system runs more efficiently  on one large partition. The data is no safer on a separate partition, and a reformat is never necessary to reinstall an operating system. The same excuses people offer  for using partitions apply to using a folder instead. For example, instead of putting all your data on the D: drive, put it in a folder called "D drive." You'll achieve the same organizational benefits that a separate partition offers, but without the degradation  in system performance. Also, your free space won't be limited by the size of the partition; instead, it will be limited by the size of the entire hard drive. This means you won't need to resize any partitions, ever. That task can be time-consuming and also can result in lost data.

19. Check the system's RAM to ensure it is operating properly. I recommend using a free program called MemTest86. The download will make a bootable CD or diskette (your choice),  which will run 10 extensive tests on the PC's memory automatically after you boot to the disk you created. Allow all tests to run until at least three passes of the 10 tests are completed. If the program encounters any errors, turn off and unplug the computer, remove a stick of memory (assuming you have more than one), and run the test again.  Remember, bad memory cannot be repaired, but only replaced.

20. If the PC has a CD or DVD recorder, check the drive manufacturer's Web site for updated firmware. In some cases you'll be able to upgrade the recorder to a faster speed. Best of all, it's free.

21. Disable unnecessary services. Windows loads a lot of services that your customer most likely does not need. To determine which services you can disable for your client, visit the Black Viper site for Windows configurations.

22. If you're sick of a single Windows Explorer window crashing and then taking the rest  of your OS down with it, then follow this tip: open My Computer, click on Tools,  then Folder Options. Now click on the View tab. Scroll down to "Launch folder windows in  a separate process," and enable this option. You'll have to reboot your machine for this option to take effect.

23. At least once a year, open the computer's cases and blow out all the dust and debris.  While you're in there, check that all the fans are turning properly. Also inspect the motherboard capacitors for bulging or leaks. 

Following any of these suggestions should result in noticeable improvements to the performance and reliability of your customers' computers. If you still want to defrag a disk, remember that the main benefit will be to make your data more retrievable in the event of a crashed drive.

10 reasons why PCs crash you must know

Fatal error: the system has become unstable or is busy," it says. "Enter to return to Windows or press Control-Alt-Delete to restart your computer. If you do this you will lose any unsaved information in all open applications."

You have just been struck by the Blue Screen of Death. Anyone who uses Microsoft Windows will be familiar with this. What can you do? More importantly, how can you prevent it happening?

1. Hardware conflict

The number one reason why Windows crashes is hardware conflict. Each hardware device communicates to other devices through an interrupt request channel (IRQ). These are supposed to be unique for each device.

For example, a printer usually connects internally on IRQ 7. The keyboard usually uses IRQ 1 and the floppy disk drive IRQ 6. Each device will try to hog a single IRQ for itself.

If there are a lot of devices, or if they are not installed properly, two of them may end up sharing the same IRQ number. When the user tries to use both devices at the same time, a crash can happen. The way to check if your computer has a hardware conflict is through the following route:

* Start-Settings-Control Panel-System-Device Manager.

Often if a device has a problem a yellow '!' appears next to its description in the Device Manager. Highlight Computer (in the Device Manager) and press Properties to see the IRQ numbers used by your computer. If the IRQ number appears twice, two devices may be using it.

Sometimes a device might share an IRQ with something described as 'IRQ holder for PCI steering'. This can be ignored. The best way to fix this problem is to remove the problem device and reinstall it.

Sometimes you may have to find more recent drivers on the internet to make the device function properly. A good resource is www.driverguide.com. If the device is a soundcard, or a modem, it can often be fixed by moving it to a different slot on the motherboard (be careful about opening your computer, as you may void the warranty).

When working inside a computer you should switch it off, unplug the mains lead and touch an unpainted metal surface to discharge any static electricity.

To be fair to Mcft, the problem with IRQ numbers is not of its making. It is a legacy problem going back to the first PC designs using the IBM 8086 chip. Initially there were only eight IRQs. Today there are 16 IRQs in a PC. It is easy to run out of them. There are plans to increase the number of IRQs in future designs.

2. Bad Ram

Ram (random-access memory) problems might bring on the blue screen of death with a message saying Fatal Exception Error. A fatal error indicates a serious hardware problem. Sometimes it may mean a part is damaged and will need replacing.

But a fatal error caused by Ram might be caused by a mismatch of chips. For example, mixing 70-nanosecond (70ns) Ram with 60ns Ram will usually force the computer to run all the Ram at the slower speed. This will often crash the machine if the Ram is overworked.

One way around this problem is to enter the BIOS settings and increase the wait state of the Ram. This can make it more stable. Another way to troubleshoot a suspected Ram problem is to rearrange the Ram chips on the motherboard, or take some of them out. Then try to repeat the circumstances that caused the crash. When handling Ram try not to touch the gold connections, as they can be easily damaged.

Parity error messages also refer to Ram. Modern Ram chips are either parity (ECC) or non parity (non-ECC). It is best not to mix the two types, as this can be a cause of trouble.

EMM386 error messages refer to memory problems but may not be connected to bad Ram. This may be due to free memory problems often linked to old Dos-based programs.

3. BIOS settings

Every motherboard is supplied with a range of chipset settings that are decided in the factory. A common way to access these settings is to press the F2 or delete button during the first few seconds of a boot-up.

Once inside the BIOS, great care should be taken. It is a good idea to write down on a piece of paper all the settings that appear on the screen. That way, if you change something and the computer becomes more unstable, you will know what settings to revert to.

A common BIOS error concerns the CAS latency. This refers to the Ram. Older EDO (extended data out) Ram has a CAS latency of 3. Newer SDRam has a CAS latency of 2. Setting the wrong figure can cause the Ram to lock up and freeze the computer's display.

Mcft Windows is better at allocating IRQ numbers than any BIOS. If possible set the IRQ numbers to Auto in the BIOS. This will allow Windows to allocate the IRQ numbers (make sure the BIOS setting for Plug and Play OS is switched to 'yes' to allow Windows to do this.).

4. Hard disk drives

After a few weeks, the information on a hard disk drive starts to become piecemeal or fragmented. It is a good idea to defragment the hard disk every week or so, to prevent the disk from causing a screen freeze. Go to

* Start-Programs-Accessories-System Tools-Disk Defragmenter

This will start the procedure. You will be unable to write data to the hard drive (to save it) while the disk is defragmenting, so it is a good idea to schedule the procedure for a period of inactivity using the Task Scheduler.

The Task Scheduler should be one of the small icons on the bottom right of the Windows opening page (the desktop).

Some lockups and screen freezes caused by hard disk problems can be solved by reducing the read-ahead optimization. This can be adjusted by going to

* Start-Settings-Control Panel-System Icon-Performance-File System-Hard Disk.

Hard disks will slow down and crash if they are too full. Do some housekeeping on your hard drive every few months and free some space on it. Open the Windows folder on the C drive and find the Temporary Internet Files folder. Deleting the contents (not the folder) can free a lot of space.

Empty the Recycle Bin every week to free more space. Hard disk drives should be scanned every week for errors or bad sectors. Go to

* Start-Programs-Accessories-System Tools-ScanDisk

Otherwise assign the Task Scheduler to perform this operation at night when the computer is not in use.

5. Fatal OE exceptions and VXD errors

Fatal OE exception errors and VXD errors are often caused by video card problems.

These can often be resolved easily by reducing the resolution of the video display. Go to

* Start-Settings-Control Panel-Display-Settings

Here you should slide the screen area bar to the left. Take a look at the colour settings on the left of that window. For most desktops, high colour 16-bit depth is adequate.

If the screen freezes or you experience system lockups it might be due to the video card. Make sure it does not have a hardware conflict. Go to

* Start-Settings-Control Panel-System-Device Manager

Here, select the + beside Display Adapter. A line of text describing your video card should appear. Select it (make it blue) and press properties. Then select Resources and select each line in the window. Look for a message that says No Conflicts.

If you have video card hardware conflict, you will see it here. Be careful at this point and make a note of everything you do in case you make things worse.

The way to resolve a hardware conflict is to uncheck the Use Automatic Settings box and hit the Change Settings button. You are searching for a setting that will display a No Conflicts message.

Another useful way to resolve video problems is to go to

* Start-Settings-Control Panel-System-Performance-Graphics

Here you should move the Hardware Acceleration slider to the left. As ever, the most common cause of problems relating to graphics cards is old or faulty drivers (a driver is a small piece of software used by a computer to communicate with a device).

Look up your video card's manufacturer on the internet and search for the most recent drivers for it.

6. Viruses

Often the first sign of a virus infection is instability. Some viruses erase the boot sector of a hard drive, making it impossible to start. This is why it is a good idea to create a Windows start-up disk. Go to

* Start-Settings-Control Panel-Add/Remove Programs

Here, look for the Start Up Disk tab. Virus protection requires constant vigilance.

A virus scanner requires a list of virus signatures in order to be able to identify viruses. These signatures are stored in a DAT file. DAT files should be updated weekly from the website of your antivirus software manufacturer.

An excellent antivirus program is McAfee VirusScan by Network Associates ( www.nai.com). Another is Norton AntiVirus 2000, made by Symantec ( www.symantec.com).

7. Printers

The action of sending a document to print creates a bigger file, often called a postscript file.

Printers have only a small amount of memory, called a buffer. This can be easily overloaded. Printing a document also uses a considerable amount of CPU power. This will also slow down the computer's performance.

If the printer is trying to print unusual characters, these might not be recognised, and can crash the computer. Sometimes printers will not recover from a crash because of confusion in the buffer. A good way to clear the buffer is to unplug the printer for ten seconds. Booting up from a powerless state, also called a cold boot, will restore the printer's default settings and you may be able to carry on.

8. Software

A common cause of computer crash is faulty or badly-installed software. Often the problem can be cured by uninstalling the software and then reinstalling it. Use Norton Uninstall or Uninstall Shield to remove an application from your system properly. This will also remove references to the programme in the System Registry and leaves the way clear for a completely fresh copy.

The System Registry can be corrupted by old references to obsolete software that you thought was uninstalled. Use Reg Cleaner by Jouni Vuorio to clean up the System Registry and remove obsolete entries. It works on Windows 95, Windows 98, Windows 98 SE (Second Edition), Windows Millennium Edition (ME), NT4 and Windows 2000.

Read the instructions and use it carefully so you don't do permanent damage to the Registry. If the Registry is damaged you will have to reinstall your operating system. Reg Cleaner can be obtained from www.jv16.org

Often a Windows problem can be resolved by entering Safe Mode. This can be done during start-up. When you see the message "Starting Windows" press F4. This should take you into Safe Mode.

Safe Mode loads a minimum of drivers. It allows you to find and fix problems that prevent Windows from loading properly.

Sometimes installing Windows is difficult because of unsuitable BIOS settings. If you keep getting SUWIN error messages (Windows setup) during the Windows installation, then try entering the BIOS and disabling the CPU internal cache. Try to disable the Level 2 (L2) cache if that doesn't work.

Remember to restore all the BIOS settings back to their former settings following installation.

9. Overheating

Central processing units (CPUs) are usually equipped with fans to keep them cool. If the fan fails or if the CPU gets old it may start to overheat and generate a particular kind of error called a kernel error. This is a common problem in chips that have been overclocked to operate at higher speeds than they are supposed to.

One remedy is to get a bigger better fan and install it on top of the CPU. Specialist cooling fans/heatsinks are available from www.computernerd.com or www.coolit.com

CPU problems can often be fixed by disabling the CPU internal cache in the BIOS. This will make the machine run more slowly, but it should also be more stable.

10. Power supply problems

With all the new construction going on around the country the steady supply of electricity has become disrupted. A power surge or spike can crash a computer as easily as a power cut.

If this has become a nuisance for you then consider buying a uninterrupted power supply (UPS). This will give you a clean power supply when there is electricity, and it will give you a few minutes to perform a controlled shutdown in case of a power cut.

It is a good investment if your data are critical, because a power cut will cause any unsaved data to be lost.




Friday, March 11, 2022

Change the default location for installing apps Windows

As the size of hard drives increase, more people are using partitions to separate and store groups of files.

Windows uses the C:\Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/ or directory by using a Registry update.

Go to :-

- Start > Run 

Or click Windows+R button

- Type “regedit” and press enter

- Go to this directory…

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

 Look for the value named ProgramFilesDir. by default, this value will be C:\Program Files. Edit the value to any valid drive or folder and XP will use that new location as the default installation directory for new programs.







Monday, March 7, 2022

Solved: High disk memory and CPU usage windows operating system

 High disk, memory and cpu usage:

There are following reasons that may cause high disk usage:

1. Un-optimized disk

2. Un-necessary services running at the start up

3. Un-necessary applications running

4. Pending windows update

Solution:

1. Disk defragmentation: After a long time data stored in the disk may not be properly fragmented, which can cause high disk usage or high cpu utilization. Open disk fragmentation by navigating to Start button and typing and opening "Defragment and optimize drives"









Select all the drives one by one and analyze it.

Once analyzed, select the drives one by one and click on Optimize. 

2. Check and disable un-necessary start up services:

Un-necessary start up service may cause high disk and cpu usage.

Open task manager, under application, check for the applications that are no longer required to be started at the start up.










Select the service, right click and click on disable for the services that are not required to be started at the start up.

3. Kill processes that are not required to be running in the background

Un-necessary process may cause high disk and cpu usage.

Open task manager, under processes, check for the processes do not belong to Windows and not required to be run by system all the time. You may end the process by selecting the process (which you know that not required to be run), right click on it and end task.

3. Disable un-necessary services: To disable un-necessary services, open run prompt (Windows+R) and type services.msc and hit enter:








In the services list, look for the non-essential running status services (other then Windows services) that are not required to be run in the background. 







Right click on the service you would like to disable, click properties, under General tab, Startup type: Select Disable, click on Apply and OK


 







Make sure to restart the computer after applying any of the steps above.

4. Pending windows update:

There are pending windows updates may cause your system slow down.

Check and update the windows by following below steps

a. From the start button, search for windows update

b. Check for updates

c. Install updates and restart the system.

Monday, June 15, 2020

Solve- Change Virtual Machine ( Virtual Box ) Android Machine Full Screen Resolution Change


1- Open your Virtual Android Machine and select debug mode Option and enter.
 2- Wait until the process will complete then press enter.
 3- In command prompt Run this 3 commands step by step
  • mkdir /boot                                           ( create Boot folder )
  • mount /dev/sda1 /boot                          ( Mount your disk with boot folder )
  • vi /boot/grub/menu.lst                           ( VI for edit your grub )
 4- Press "i" (for edit) and go to the first line begins with kernel /android, and add vga=ask after SRB=/android-... ( Look the image )  ↴

 
5- After edit press "ESC" (Exit editing) then press shift+zz (save and exit).
6- In the command prompt run this commands.
  • umount /boot                             
  • rmdir /boot                                 ( Remove your directory )
  • reboot -f                                      ( Rebooting )
7- After Reboot close your machine for set your resolution in vga list.
8- Check your main machine resolution. In my case my machine resolution is 1366x768x32.Open Terminal (Linux) or Command prompt (Windows) and run this command.
  •   VBoxManager setextradata "Android-9" "CustomVideoMode1" "1366x768x32"
( Replace Android-9 with your android machine name and replace resolution 1366x768x32 with your Main machine Resolution.)
9- Now start your Android machine.
 10- Press enter for selection your resolution list.

 11- Check your resolution in this list and type the number of your resolution and press enter.
 
After this booting process you will get your Full Screen Resolution Android Virtual Machine.

Thursday, June 11, 2020

Hack The Box Connect your 1st Machine Setup your HTB Machine for Testing

Create Lab

1- Create Virtual Box Machine or Virtual Machine with Kali Linux
2- Install OpenVpn by this command (I have already installed).
 sudo apt-get install openvpn

Now How to Connect Machine of Hack The Box.

1- Login to Hack The Box.
https://www.hackthebox.eu/login

2-  Go to  Access and read Lab Access Details.
 3- Also Check current status of your Server.

4- Download the Connection Pack file.
5- Downloaded file Extension is ".OVPN". Now connect server using this file. Run this command on terminal.
sudo openvpn download_file.ovpn

replace file with your downloaded file and run the command. After running you got the message after success Completed. 
Do not close this Terminal after completed. 
6- Also check status on your site.
Your server connection status is UP.

7- Now select the machine of Hack The Box. Select All option below in Machines for showing all Machines.
Right side you have options for Filters. Now filter which machine you want to connect.

After filter select any machine and open by clicking on name of machine.
you got this window.
Now you have a Name of your machine and IP.
8- Ping this ip on terminal by this command.
ping 10.10.10.181
if your ip pinging that mean you are success full established your connection with your Hack The Box testing machine.


Now Enjoy Testing your Hack The Box Machine.





Set up gmail in outlook using app password

You might receive an error saying, "unable to connect to your outgoing server" while setting up a gmail account in outlook even wh...