Pages

Monday, 3 February 2014

C PROGRAM TO PRINT NUMBERS 1 TO N WITHOUT USING LOOPS

C PROGRAM TO PRINT NUMBERS 1 TO N WITHOUT USING LOOPS

#include<stdio.h>
void print_numbers(int,int); //declaring function definition
main()
{
  int n;
  printf("\n *** Ali's Programming World ***");
  printf("\n >>> Program to print numbers 1 to n without using Loops <<<");
  printf("\n\n Enter the value of n: ");
  scanf("%d",&n); //taking value of n as input from user
  print_numbers(1,n); //calling the function
  getch();
}
void print_numbers(int i,int max)
{
 printf("%3d\t",i);
   if(i<max)
   {


    //calling function recursively
    print_numbers(++i,max);
   }
   return;
}

Out put 

Sunday, 2 February 2014

How to make a Autorun.inf file

How to make a Autorun.inf file


Auto run is file that triggers other programs,documents ,other files to be opened when the cd or pen drives are inserted.  Simply triggers.

When cd or pen drives are inserted, windows will search for the autorun.inf file and follow the instructions of autorun.inf file(instructions have written inside the autorun.inf file).

How to create Autorun file?

Open notepad
type this command:
[Autorun]
save the file as "autorun.inf" (select all files, not text )

Complete Syntax and instructions inside the Autorun file:
Basic syntax must be inside  the autorun.inf file is :
[Autorun]
This will be used to identify the the file as autorun.

OPEN=
This will specify which application should be opened when the cd or pen drive is opened

Example:
open=virus.exe
This will launch the virus.exe file when cd or pen drive is opened.  The file should be in root directory.
if the file is in any other sub directories ,then we have to specify it.
Open=RECYCLER\Virus.exe
Explore=
Nothing big difference. if you right click and select explore option in cd or pen drive.  This command will be run.

AutoPlay=
Same as the above , but it will launch the the program when auto played.


SHELL\VERB =

The SHELL\VERB command adds a custom command to the drive's shortcut menu. This custom command can for example be used to launch an application on the CD/DVD.

Use a series of shell commands to specify one or more entries in the pop-up menu that appears when the user right-clicks on the CD icon. (The shell entries supplement the open command.)

Icon=
Change the icon of your pen drive or cd.  you can use .ico,.bmp images(also .exe,.dll)


Customizing the icon menu

To edit the menu that appears when you right-click on the icon, simply add the following syntax:

shell=start shell\start\command=path/myapplication.exe 

shell\start=Run Application

shell\read\command=notepad++.exe files/readme.txt 

shell\read=open readme.txt .