Thursday 26 December 2013

Quickest Way Shutdown (Restart or Hibernate)

I have to admit when I first started using Windows 8 and tried to shut it down for the first time I was a little frustrated. Even after I learned how to properly shutdown the system, I wasn't really happy with any method I found, until I came up with the solution below.

Utilizing a built-in feature of the Windows application shortcut you can execute any of these operations with shortcut keys. This feature is mostly forgotten, and has literally been around for decades.
  • On an empty area of the Windows desktop, right-click and select New > Shortcut. When the 'Create Shortcut' dialog box appears, typeshutdown /s /t 0 and press the Next button.
    • to restart the computer, use: shutdown /r /t 0 
    • to hibernate the computer, use: shutdown /h /t 0
    • to log-off of the current session, use: logout 
  • Give the shortcut a name, and then press the Finish button. 
  • Right-click the new shortcut icon, and select Properties.
  • In the Properties window, click in the box next to the Shortcut key.  Type in your desired shortcut. For example, press CTRL+ALT+S (or anything else you want, personally I use CTRL+ALT+SHIFT+S to help avoid accidentally shutting down the computer).
  • Press the OK button. 
Now all you have to do is press the shortcut key you created, and the computer will perform the operation you selected. To delete the keyboard shortcut, open its file properties dialog box click the box next to 'Shortcut key', and press the Delete key.

Note: This trick can be used on just about any application shortcut, and in most versions of Windows.

Bonus Tip: another quick way to shutdown Windows is to click an empty area of the desktop and press ALT+F4.

Windows 8: TCP/IP Addressing (Static and Dynamic)

In Windows, you can have one of two types of IP addresses: dynamic or static. Dynamic IP addresses are temporarily assigned to a network device when their requested, and is generally done during the boot process. The network service that assigns dynamic IP addresses is known as DHCP. While static IP addresses have to be manually assigned to a device by a systems administrator, and are meant to be changed infrequently.

Dynamic IP addresses are the most common method of assigning an IP address to a network based device (such as a computer, printer, etc) because it reduces the network administration overhead. Today's office and work force are in a constant state of flux. People with mobile devices (such as tablets, smartphones, and laptops) will move from location to location, even desktop users can get moved around within a company on a semi-regular basis.
Note: If a Windows client makes a DHCP request for an IP address and doesn't get a reply in a timely manor, then it will switch to using Automatic Private IP Addressing (APIPA). APIPA is a private IP address range (169.254.0.0 to 169.254.255.255) that allows devices on a network using this address range to communicate with themselves. To configure this service, click on the Alternate Configuration tab in the Internet Protocol (TCP/IP) dialog.
If all devices used a static IP address, it would cause a network administration nightmare, they would all have to be changed every time a device was moved.  Most static IP addresses are assigned to servers or network based devices like routers or DNS servers. These devices need a static IP address because other devices on the network depend on knowing how to contact them.

To configure the TCP/IP addressing (dynamic or static) in Windows, follow the instructions below:
  • From the Start screen, type Network and click Settings on the right.  Click the Network and Sharing Center icon.  In the left pane, click theChange adapter settings link.
  • Right-click the active network connection (note: this selection can change between systems depending on the equipment that is installed), and select Properties.
  • Select Internet Protocol Version 4 (TCP/IPv4) [or Internet Protocol Version 6 (TCP/IPv6) depending on how your network is configured] and the press the Properties button.
From here you can select one of two options, Obtain an IP address automatically(dynamic) or Use the following IP address (static). If you're using a static IP address you need to know the following information: unique IP address, subnet mask for the network, IP address of the default gateway, and the IP addresses of the primary and secondary DNS servers. When you're done press the OK button twice.

Networking tips:

  • To find the TCP/IP address of the local computer, from the command prompt type: IPCONFIG /ALL.
  • To request a new DHCP address, from an administrator command prompt type: IPCONFIG /RELEASE and then type: IPCONFIG /RENEW 

 (Advanced) How to Find the MAC Address of Remote Computer

Every device on a TCP/IP network has a unique number assigned to it called the MAC (Media Access Control) address. The MAC address is used by the network hardware such as routers, switches, etc. to send traffic from one device to another device on your network.

Your computer uses a service called ARP (Address Resolution Protocol) to resolve and track the TCP/IP and MAC address of the remote devices that you're communicating with. This information is handy for doing semi-low level network troubleshooting. It can also be used for granting or denying permissions to a network segment or device on that network.

To determine the MAC address of a remote device:
  • Open the MS-DOS prompt (From the Run... command, type "CMD" and press Enter).
  • Ping a remote device that you want to find the MAC address (for example: PING 192.168.0.1).
  • Type "ARP -A", and press Enter.

Microsoft Windows XP [Version 5.1.2600] 
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS>arp -a


Interface: 192.168.1.100 --- 0x10004 
Internet Address Physical Address Type
 
192.168.1.1 aa-fb-c8-34-da-7a dynamic

Windows 8: Managing the Send To Menu

The Send To menu is a very useful context menu. This feature gives you the ability to right-click on any file and perform a specific action, such as sending a file to the desktop or another location. You can also send a file to a blank e-mail, so that it can be mailed to a friend. The options are not limitless, but they're pretty extensive.

To access the Send To menu, do the following:
  • From the Run... command (WinKey + R) Open field or the File Explorer address bar type%userprofile%\AppData\Roaming\Microsoft\Windows\SendTo and press the Enter key.
  • From here you can create new folders, shortcuts to applications (such as Notepad), and more. If you create a shortcut to an application, make sure that it can handle those file types you want to send it.
If you ever want to remove some items from the Send To menu, just open up the folder and delete the shortcuts you don't want.

Windows 8: File Explorer Keyboard Shortcuts

Most of us use Window's built-in File Explorer application (formerly known as the Windows Explorer) to manage files, folders and drives that are accessible by the local computer.

If you prefer using the keyboard to control an application, here are some of the better keyboard shortcuts to know for the File Explorer.
  • Ctrl + F: Open up the search pane. 
    • Build a complex search query using the controls in the pane to find specific files.
  • Alt + Up Arrow (or backspace): Go up a folder.
  • Alt + Right Arrow: Go forward (takes you back into your folder browsing history)
  • Alt + Left Arrow: Go back (takes you back into your folder browsing history)
  • Alt + D: Focus the address bar and select the current path.
  • Alt + P: Shows the Preview pane
  • Alt + Shift + P: Shows the Details pane
  • Alt + Enter: Properties of the selected file
  • Ctrl + Mouse wheel: changes the folder view type.
  • Ctrl + Shift + N: Creates a new folder at the current location
  • Ctrl + F1: Opens or closes the ribbon at the top of the window 
  • F4: Opens dropdown menu in the address bar.
  • F11: Puts the File Explorer into full-screen mode.
Note: The Windows File Explore tracks the folder browsing history, similar to the way Internet Explorer's tracks your browsing history. Every folder or network path you visit is remembered, you can then use the Alt+Left or Right arrow to move through the folder location history that were previously visited.

 Windows 7- speed up tips

The Microsoft Windows 7 operating system has been designed for delivering better speeds than its predecessors. However, as time passes by, the laptop/PC might tend to get slower. This is not exactly the fault of the OS. As the matter of fact, it is a common problem faced by many operating systems.
windows 7 performances tips
The major reasons for this are accumulation of junk in the system or a highly stuffed hard drive or running of too many unnecessary services and programs. Here we shared a few essential tips that can help speed up Windows 7 performance on laptops or computers. Hope it helps!

Visual And Sound Related

1. Using Minimal Visual Effects

Disabling certain (or all) visual effects can definitely enhance performance. To disable visual effects, do the following:
  1. Press Windows key and while holding it down, press Pause/Break key.
  2. In the window that appears, click on Advanced system settings in the left side pane.
  3. In the Advanced tab, under Performance Section, click on Settings
  4. In the Performance Options window (refer figure) that appears, under Visual Effects tab, disable the options that you do not need. Or simply selecting ‘Adjust for best performance‘ will disable all options.
  5. After disabling the option, click Apply and then OK.
Doing the above might make the screen less attractive. But, the performance will surely get a boost.
performance options

2. Using Minimal Sound Effects

For disabling sound effects, do the following:
  1. Click Start. In the search box type mmsys.cpl and press Enter
  2. In the Sound window (refer figure) that appears click on Sounds tab
  3. Set the Sounds scheme to ‘No Sounds
  4. You could set only the essential sounds if needed in the Program Events, by selecting the specific event and then choosing the sound from the Sounds drop-down menu below.
  5. You can as well disable the "Play Windows Startup sound" option.
  6. After the settings are done, click Apply and OK.
sounds

Software And Services Related

1. Run A Trusted Anti-Virus Program

Ensure that you have a good anti-virus software loaded on your laptop/computer. This will ensure that no malware or spyware gets planted in your system. Without such protection software, there are chances of third party malware and virus being installed or stored on your system, causing harmful effects and also eating up precious space.

2. Install Only Essential Software

Ensure that you install only that software which you need. If you install any trial software and find out that you don’t really need it, uninstall and delete it immediately. Else, they might hog precious disk space, RAM and processor cycles. If you’ve installed a software, which you are unable to get rid of, and which is hampering the normal functioning of your laptop, then you might have to format your hard drive. Be aware that formatting your hard drive might wipe out all your data. Therefore it is best you take a back-up before going ahead with formatting.

3. Disable Or Make Unneeded Services Manual

Some processes and services, which might not really be necessary, are by default made to start automatically once the system starts up. They will consume RAM as well as the processor’s attention, slowing down other important tasks. It is best to disable them. For this, do the following:
  1. Click Start. In the search box type services.msc and press Enter
  2. Go to Services & Applications > Services. You’ll see the Services window (refer figure).
  3. Right-click on a service that you wish to set to manual or disable. If the service is already started, Stop it first.
  4. Once the service is stopped, again right-click on it and select Properties.
  5. In the Startup type, you can either set the service to Manual, if you would be using it later, orDisable it, if not needed.
  6. Once done, you can close the window.
services

4. Disabling Unwanted Start-Up Programs To Speed Up System Start-Up

Some programs are set to start during system start-up. These might slow down the start-up process. Programs that are not really needed during start-up can be disabled. For this, do the following:
  1. Click Start. In the search box type msconfig and press Enter.
  2. In the System Configuration window (refer figure), go to Startup.
  3. Uncheck the box next to those processes that are not important for start-up. This will disable them.
  4. Once you’ve disabled the processes, click Apply and OK.
system configuration

Hard Drive Related

1. Clean Up The Hard Drive

Remove unwanted files, like temp files, downloaded program files, recycle bin, etc. You could useDisk Cleanup option to do this, as follows:
  1. Click Start > All Programs > Accessories > System Tools > Disk Cleanup
  2. The system will first calculate how much space can be freed up this way. In the Disk Cleanupwindow (refer figure) that appears, select the files in that need to be deleted under the Files to delete list.
  3. For deleting ‘System Restore‘ and ‘Shadow copy‘ files, click "Clean up system files" and then on "More Options" tab
  4. Finally click OK. You’ll be prompted again before the deletion. Click Yes.
disc cleanup

2. Enable Write Caching On Device

This is an option which allows the OS to flush changed data to the hard disk when the system is idle, so that performance is not affected when in use. For enabling this, do the following:
  1. Press Windows key and while holding it down, press Pause/Break key.
  2. In the window that appears, click on Device Manager in the left hand pane.
  3. In the next window that appears, expand Disk drives.
  4. The drop-down list will show the hard drive. Right-click on it and select Properties.
  5. Click the Policies tab in the Device Properties window (refer figure).
  6. Check the box next to "Enable write caching on the device"
  7. You can as well check the box next to "Turn off Windows write-cache buffer flushing on the device" and then click OK.
virtual HD
Note: However, there is one disadvantage in enabling these options – if there is a power outage or a system crash, data might be lost or corrupted. If you have a secondary power supply, like a UPS, you could go ahead with checking these options.

3. Perform Disk Defragmentation

When there is no sufficient space to store in a hard drive, the OS splits the file into parts and stores it in different areas on the hard drive. Defragmenting allows all these parts to be stored in contiguous memory locations. For defragmenting disk do the following:
  1. Click Start > All Programs > Accessories > System Tools > Disk Defragmenter
  2. In the window (refer figure) that appears, click on the drive that you want to defragment and then click Analyze disk.
  3. This will estimate the time required for the process. When done click on Defragment disk.
  4. Once done you can either View Report or click Close.
disk defrag
These pretty much sum up the small things that you can do, to make a big difference to your Windows 7′s performance. If you have some personal tips you’ve done yourself to improve the performances, we’d like to hear from you.

Friday 6 December 2013

C

Program  to Print its Own Source Code-: C

C Program to Print its Own Source Code 
Ever wondered how to write a C program to print its own source code? Well, here is the source code of a C program that when executed will print its own source code. In other words, the output of this program is exactly same as its source code.
Here’s the program:

#include<stdio.h>
char *program=”#include<stdio.h>%cchar *program=%c%s%c;%cvoid main()%c{%cprintf(program,10,34,program,34,10, 10,10,10);%c}”;
void main()
{
printf(program,10,34,program,34,10,10,10,10);
}

Enable or Disable Hibernation in Windows 7

Enable Hibernation in Windows 7 
Enabling or Disabling the “Hibernate” option in Windows 7 or Vista is not as simple as it used to be in Windows XP. For Windows 7, a different approach has to be followed to accomplish the same job.
In this post you will find the information on how to enable or disable the Hibernate option in Windows 7.
Hibernation is a power saving option which was designed primarily for laptops. Unlike the “sleep mode” which puts the open documents and files into the memory, hibernation puts all the open files and documents on to the hard disk and shuts down the computer without drawing even a small amount of power.
Thus, hibernation becomes an excellent way to save power and resume the Windows back to the state where it was left off. If you really want to use this feature on Windows 7 then you need to enable this option. This can be done as follows:
Step-1. Open the Command Prompt with “Administrator rights”. To do so, type cmd in the Start menu and then hit Ctrl+Shift+Enter.
Step-2. Now type the following command in the command prompt and hit Enter.
powercfg /hibernate on
Step-3. Type exit and hit Enter to close the Command Prompt.
Now you should see the “Hibernate” option in the Start menu. If you still do not see the “Hibernate” option, then perform the following steps:
  1. Type Power Options in the Start menu and hit Enter.
  2. In the left pane, open the link labeled “Change when the computer sleeps” and then open the link “Change advanced power settings”.
    Now a small window will pop-up as shown below:
    Enable Hibernation in Windows 7
  3. Now expand the Sleep tree and turn off Allow Hybrid Sleep as shown in the above screenshot.
  4. You should now see the “Hibernate” option appearing in the Start menu.
I hope you like this post. If you have anything to say or have difficulties following this post, please pass comments. Cheers :)

Customize Start Menu Button in Windows 7

Customize Win 7 Start Menu 
Have you ever wondered to know how to customize the start menu button in Windows 7? Are you bored of seeing the same old start menu button that is there from the time of Vista? Well, it is possible to spice up your copy of Windows 7 by giving a new look to the start menu button.
In this post, I will show you how to do that in an easy to follow step-by-step manner.

Tools that you need:

  1. Resource Hacker
  2. Custom Start Menu icons (images). It mush be of the size 54×162 with a .bmp extension. which looks something as follows: Start Menu Icon
    As shown in the above image, it must be in the following order:
    1st Image: When the button is not in use.
    2nd Image: When the mouse pointer is over the button.
    3rd Image: When the button is clicked.
I have created a few customized buttons which are ready to use. You can download them from the following link:
Start Menu Buttons Download
Once you have all those resources ready, you can start the customization process as follows:
  1. Take the ownership of the file “explorer.exe“ which is located in the Windows Folder (Most likely in C:\Windows).
  2. Open the Resource Hacker Tool.
  3. Go to File menu and click on Open. Now load the file “explorer.exe” into the Resource Hacker.
  4. Expand Bitmap branch in the left pane.
  5. Now expand 6801 option, right-click on 1033 and select Replace Resource option.
  6. A new window appears. Click on Open file with new bitmap button.
  7. Navigate to the customized (.bmp) image, open it and click on Replace button.
  8. Repeat steps 4 to 7 above for the options 6805 and 6809 as well.
  9. Customize Win 7 Start Menu Button
  10. Now click on Save option (File->Save). Resource Hacker will automatically create a backup file called explorer_original.exe so that you can restore it in the future if needed.
  11. Log Off and Log On to see the changes in effect.
The following images shows a preview of how your start menu would look like, before and after the customization process is done.

Default Start Menu Button:

Win 7 Start Menu - Default

Customized Start Menu Button:

Customized Win 7 Start Menu
Customized Win 7 Start Menu
Customized Win 7 Start Menu
NOTE: If you are running 64-bit edition of Windows 7, then you need to use Resource Hacker version 3.5.2 beta which is 64-bit compatible. It is available from the same link provided above.

UPDATE:

The above method shows you the manual way to customize the start menu button in Windows 7. Alternatively, there is a nice tool out there using which it is possible to accomplish the same job without the need to manually edit the files and follow a long list of procedures. The tool is called Windows 7 Start Button Changer. You can download it from the following link:
I hope you enjoy this trick. Pass your comments and share your experience. Try at your own risk/

SSL

Working of Secure Sockets Layer (SSL)

Know More About Secure Sockets Layer (SSL) 
Secure Sockets Layer (SSL) is the most widely used technology for providing a secure communication between the web client and the web server. Most of us are familiar with many sites such as Gmail, Yahoo etc. using https protocol in their login pages. When we see this, we may wonder what’s the difference between http and https.
In simple words, a HTTP protocol is used for standard communication between the Web server and the client. HTTPS is used for a “Secure communication”.

How Secure Sockets Layer Works?

Before we understand the concept of SSL, let us first learn what a “Secure Communication” means. Suppose there exists two communicating parties: Say A (client) and B (server).

Working of HTTP:

When A sends a message to B, the message is sent as a plain text in an unencrypted manner. This is acceptable in normal situations where the messages exchanged are not confidential. But, imagine a situation where A sends a PASSWORD to B. In this case, the password is also sent as a plain text. This has a serious security problem because, if an intruder (hacker) can gain unauthorized access to the ongoing communication between A and B , he can easily obtain the PASSWORDS, since they remain unencrypted. This scenario is illustrated using the following diagram:
Working of HTTP

Now let us see the working of HTTPS:

When A sends a PASSWORD (say “mypass“) to B, the message is sent in an encrypted format. The encrypted message is decrypted on B‘s side. So, even if the Hacker manages to gain an unauthorised access to the ongoing communication between A and B he gets only the encrypted password (“xz54p6kd“) and not the original password. This is shown below:
Working of Secure Sockets Layer

How is HTTPS implemented?

HTTPS is implemented using Secure Sockets Layer (SSL). A website can implement HTTPS by purchasing an SSL Certificate. Secure Sockets Layer (SSL) technology protects a Web site and makes it easy for the site visitors to trust it. It has the following uses:
  1. An SSL Certificate enables encryption of sensitive information during online transactions.
  2. Each SSL Certificate contains unique and authenticated information about the certificate owner.
  3. A Certificate Authority verifies the identity of the certificate owner when it is issued.

How Encryption Works?

The whole concept of Secure Sockets Layer is implemented on the basis of RSA algorithm where each SSL Certificate consists of a Public key and a Private key. The public key is used to encrypt the information and the private key is used to decrypt it. When your browser connects to a secure domain, the server sends a Public key to the browser to perform the encryption. The public key is made available to everyone but the private key(used for decryption) is kept secret. So, during a secure communication, the browser encrypts the message using the public key and sends it to the server. This message is decrypted on the server side using the Private key(Secret key).

How to Identify a Secure Connection?

In the Internet Explorer and most other browser programs like Firefox or Google Chrome, you will see a lock icon Picture of the Lock icon in the Security Status bar. The Security Status bar is located on the right side of the Address bar. You can click the lock to view the identity of the website.
In high-security browsers, the authenticated organization name is prominently displayed and the address bar turns GREEN when an Extended Validation SSL Certificate is detected. If the information does not match or the certificate has expired, the browser displays an error message or warning and the status bar may turn RED.
So, the bottom line is, whenever you perform an online transaction such as Credit card payment, Bank login or Email login always ensure that you have a secure communication. A secure communication is a must in these situations. Otherwise there are chances of a Phishing attack using a fake login page.
I Hope you like the information presented in this article. Please pass your comments.