How to free used ports on windows

“netstat” command is used to check which program is using which port.
Here are steps to forcefully free used ports.

Steps:


1) Search cmd and run it as Admin Mode by choosing “Run as administrator” on right click.

2) Type following command and hit enter 

    netstat –ano 

This will provide a list of ports, along with the PID (process ID) that has those ports open.



   (Shortcut: netstat -ano | findstr portNumber)

3) Now Check the process id corresponding to which you want to free port

    taskkill /PID XXX 


4) To forcefully kill

    taskkill /F /PID XXX


Virus : One line code to hang your friend’s PC
MS-DOS is very powerful Operating System that makes you able to create batch files the .bat file. Batch files are created to run instructions in a batch. So many pranks and the virus can be created using this. This post will guide you how to create a simple virus prank that will hang anyone’s PC. Try this on your friend’s PC to annoy them 😛

Steps

1) Open any text editor (Notepad) and Type
%0|%0 

2) Save it as a batch file that is file extension must be .bat.

3) This step is optional to check what is going to happen. Open task manager by pressing Ctrl + Alt + Del and click on performance tab to view the changes those are going to happen.

4) Run the batch file.

5) Within the few seconds, the performance of your machine will be degraded and 100% memory will be full and within a minute your machine will be hanged.

Explanation  

In Windows, “%0” is the name of the currently executing Batch File. By executing %0|%0, we are recursively calling the Batch File, thereby creating many processes and utilizing CPU resources up to a point where CPU cannot offer more resources to the processes which will be created(forked) after a certain amount of time.

Bootable USB flash drive : Install Windows from pen drive


1) Open a Command Prompt window as an administrator.


2) Type diskpart.

3) Type list disk, to determine the disk number .The list disk command displays all the disks on the computer. Note the drive number or drive letter of the USB flash drive.

 



4) Type select disk <X>, where X is the drive number or drive letter of the USB flash drive, and then click ENTER.


 

 

 
5) Type clean, and the click ENTER. This command deletes all data from the USB flash drive.
 
6) To create a new primary partition on the USB flash drive, type create part pri, and then click ENTER.
 
7) To select the partition that you just created, type select part 1, and then click ENTER.
 
8) Type format fs=ntfs quick to format the disk. To format the partition as FAT32, type format fs=fat32 quick.

 

9) Type active, and then click ENTER.
 
10 ) Type exit, to exist from cmd.
 
11) Now save your custom image to the root of the USB flash drive.

 

Windows Registry : Run your Scripts on Windows Startup

Windows Registry is a kind of database of windows where all the operating system related information is available. All the user preferences, configuration, software, device driver and hardware related information can be found here. You can access Windows Registry using by typing regedit.exe in Run dialog box (Windows + R).

In this post we will discuss one of the use of Windows Registry.

 

How you can register your program in Windows Registry to start it automatically?

 

Windows loads programs to start in the following order

1) Program listed in the Local Machine hive

2) Current User hive

3) Win.ini Run= and Load = lines

4) Start Up folder.

 

To add or remove programs in the Registry

1 ) Open Windows Registry.

2) Go to any of following  

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run

OR

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \ Services

OR

HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run

OR

HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \ Services

3) Add a new String Value and name it anything you like.

4) For the value data, enter the path and executable for the program you want to run.

5) By adding the value to the HKEY_CURRENT_USER hive instead allows the program to start only when that user is logged on.

6) If you add the value to the RunOnce key the program will run once and be removed from the key by Windows. 

7) Done

Get back the AM / PM symbols into task bar’s time


1) O
pen Regional and Language Options window by pressing Windows + R and type intl.cpl 

 
 

2) Click on “Addition Settings” button.

3) Go to “Time” tab and you’ll see the value of “Long time” will be set to HH:mm:ss. Just add tt at last of the value, i.e. change the value to HH:mm:ss tt

4) If you want to show the time in 12 hour format (06:30 instead of 18:30), then change the value to hh:mm:ss tt

 
 
5) Done
en_USEnglish
en_USEnglish