Monday 27 February 2012

A note to all my blog visitors

I would like to inform all my blog visitors that I have resolved the problem which I was facing earlier. Now I am able to access my4shared account. I have also So all of you can get the full codes from now on besides the important functions. I will include the important functions in my posts as suggested by certain visitors so that you can understand the codes even without downloading them as it is not possible to post codes of more than 100 lines like that of GUI programs.

Sunday 19 February 2012

Change Logon Screen Background of Windows7

Everyone would like to change the logon screen backgroundof Windows7. This will give your Windows7 a customized look. You can set your own picture as background svreen. You will have to follow the steps below to change background screen -->
1 : The image that you should set should be a .jpg file and its size should be less than 245KB.
2 : The image can have any resolution. I personally have used 1400 x 900. This is actually my screen resolution. You can use any photo editors to change resolutions. But you will have to save the image with file name backgroundDefault.jpg.
3 : Next you will have to copy the image to
C:\Windows\system32\oobe\info\backgrounds
If this path does not exist then you will have to create it.
4 : Go to Run and type regedit. This will open Registry Editor. Navigate to
HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\
LogonUI\Background


If background does not exist then right-click LogonUI, select New and then Key and name it Background. Now locate OEMBackground in the right pane. If it does not exist, then right-click Background and select New and then DWORD and name it OEMBackground.
5 : Double click on OEMBackground and set the Value Data to 1.
6 : Log off to see the new logon screen. In order to go back to old background screen set Value Data to 0.

Apology to all my blog visitors

Here I would like to apologize for problems that you might have faced these days while viewing my blog. I would like to inform you that for certain reasons I am unable to upload files to my 4shared account. I am also not able to give links to certain programs that I have written and have posted in my blog. So in this regard I want that you people will give me some time in finding out the problem in order to provide you with latest posts and programs. Hence you people may not be able to get certain programs now. Therefore from now on I will try to post only certain functions rather than full codes to help you out till the problem is solved.

Saturday 18 February 2012

C program Virus to disable USB ports

C programming language is very useful in gaining access to system softwares and information. Keeping this view in mind or rather to say using this ability of C language I have created a virus program which is able to gain access to registry and disable USB ports. Here I have used the system function to disable USB ports.

The C code to block USB ports -->
#include<stdio.h>
void main(){
          system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
}

The C code to unblock USB ports -->
#include<stdio.h>
void main(){
          system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");
}

Thursday 16 February 2012

Java program to compress a file using GZIP

Java can be very efficiently used in compressing files. Java's util package contains certain library classes known as GZIPOutputStream which can be used to compress a file with file extension as .gz. Again we can use GZIPInputStream to decompress any file with extension .gz. Here I will post a function that takes in source and destination file as parameter. It then reads source using FileInputStream and writes the output to destination using GZIPOutputStream. A buffer array is taken which reads certain bytes at a time from source.
Function written below :
     public void gzipFile(String src, String dest) throws Exception {
            FileInputStream in = new FileInputStream(src);
            GZIPOutputStream out = new GZIPOutputStream(new FileOutputStream(dest));
            byte[] buffer = new byte[4096];
            int bytesRead;
            while ((bytesRead = in.read(buffer)) != -1)
                 out.write(buffer, 0, bytesRead);
            in.close();
            out.close();
     }

Monday 6 February 2012

Windows7 usage without Activation for one year

Most of you might be aware of the fact that it is possible to use Windows 7 and Vista for 120 days without activation. This is possible using the slmgr -rearm command which will extend the trial period from 30 days to 120 days. However in this post I will show you a trick by which it is possible to use Windows 7 without activation for an year.

1 : Goto Start Menu>Run. Type cmd and press Enter.

2 : Now type slmgr -rearm and hit enter at prompt.

3 : You will be prompted to restart the computer. Once restarted the trial period will be once again reset to 30 days. You can  use above command for up to 3 times by which you can extend the trial period to 120 days without activation.

4 : Now comes the actual trick by which you can extend the trial period from 120 days to 360 days. Open Registry Editor (type regedit in Run and hit Enter) and navigate to the following location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform

5 : In right-side pane, change value of SkipRearm to 1.

6 : Now you will be able to use the slmgr -rearm command for another 8 times so that you can skip activation process for another 240 days. So you will get 120 + 240 = 360 days of free Windows 7 usage.