Home  |  About Me | Thoughts  | Tutorials  |  Projects | Robotics | out's That   


Do it at your own Risk...............

win32 console application code by dushyant joshi.

With the following code we can simply add or remove the new options in our windows these options are basically in the windows registry which we can edit with the help of win32 console application provided by Microsoft visual C++ (any version).

but before it let's take a look on windows registry..........

 registry>>> <The Back Door Entry To The Windows>

The Registry is a database used to store settings and options for the 32 bit versions of Microsoft Windows; including Windows 95, 98 and NT. It contains information and settings for all the hardware, software, users, and preferences of the PC. Whenever a user makes changes to a Control Panel settings, or File Associations, System Policies, or installed software, the changes are reflected and stored in the Registry.

structure of registry>>>

The Registry has a hierarchal structure, although it looks complicated the structure is similar to the directory structure on your hard disk, with Regedit being similar to Windows Explorer. Each main branch (denoted by a folder icon in the Registry Editor, see below) is called a Hive, and Hives contains Keys. Each key can contain other keys (sometimes referred to as sub-keys), as well as Values. The values contain the actual information stored in the Registry. There are three types of values; String, Binary, and DWORD - the use of these depends upon the context. There are six main branches, each containing a specific portion of the information stored in the Registry. They are as follows:

· HKEY_CLASSES_ROOT : This branch contains all of your file association types, OLE information and shortcut data.

· HKEY_CURRENT_USER : This branch links to the section of HKEY_USERS appropriate for the user currently logged onto the PC.

· HKEY_LOCAL_MACHINE : This branch contains computer specific information about the type of hardware, software, and other preferences on a given PC, this information is used for all users who log onto this computer.

· HKEY_USERS : This branch contains individual preferences for each user of the computer, each user is represented by a SID sub-key located under the main branch.

· HKEY_CURRENT_CONFIG : This branch links to the section of HKEY_LOCAL_MACHINE appropriate for the current hardware configuration.

· HKEY_DYN_DATA : This branch points to the part of HKEY_LOCAL_MACHINE, for use with the Plug-&-Play features of Windows, this section is dymanic and will change as devices are added and removed from the system.

____________________________***__________________________________
With the help of this code two new options are added on the right click menu. And they are “copy to” and “move to” and these options are very useful when we want to cut a folder content to another folder. And if we want to copy the folder content to another folder.
***** This trick will work on all the versions of windows.
***** No need to restart your computer. This will work just after refreshing the desktop.

____________________________***___________________________________
 


#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
#include <windows.h>
//#include<string.h>

void main(void)
{
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow);
char *lpData1="{C2FBB630-2971-11d1-A18C-00C04FD75D13}";
DWORD lpdwDisposition1;
HKEY phkResult1;
LONG copyto;
char *lpData2="{C2FBB631-2971-11d1-A18C-00C04FD75D13}";
DWORD lpdwDisposition2;
HKEY phkResult2;
LONG moveto;
moveto =
RegCreateKeyEx(
HKEY_CLASSES_ROOT,
"Directory\\shellex\\ContextMenuHandlers\\Move To", // subkey name
0,
NULL, // class string
REG_OPTION_NON_VOLATILE, // special options
KEY_ALL_ACCESS, // desired security access
NULL, // inheritance
&phkResult2, // key handle
&lpdwDisposition2 // disposition value buffer
);
moveto= RegSetValueEx(
phkResult2, // handle to key
"", // value name
0, // reserved
REG_SZ, // value type
(BYTE*)lpData2, // value data
strlen(lpData2)+1); // size of value data

copyto=
RegCreateKeyEx(
HKEY_CLASSES_ROOT,
"Directory\\shellex\\ContextMenuHandlers\\Copy To", // subkey name
0,
NULL, // class string
REG_OPTION_NON_VOLATILE, // special options
KEY_ALL_ACCESS, // desired security access
NULL, // inheritance
&phkResult1, // key handle
&lpdwDisposition1 // disposition value buffer
);

copyto= RegSetValueEx(
phkResult1, // handle to key
"", // value name
0, // reserved
REG_SZ, // value type
(BYTE*)lpData1, // value data
strlen(lpData1)+1); // size of value data

}



____________________________***__________________________________
This code will simply speed up the delay of start menu . and the    change done by this code is not virtual its real. for more detail click    more>>

***** This trick will work on all the versions of windows.
***** No need to restart your computer. This will work just after refreshing the desktop.

____________________________***___________________________________


This is the code for speedup the menu delay:-

// startdelay.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
#include <windows.h>
//#include<string.h>

void main(void)
{
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow);

char *lpData="0";
DWORD lpdwDisposition;
HKEY aphkResult;
LONG showdelay;

showdelay=
RegCreateKeyEx(
HKEY_CURRENT_USER, // handle to open key

"Control Panel\\Desktop", // subkey name
0, // reserved
NULL, // class string

REG_OPTION_NON_VOLATILE, // special options
KEY_ALL_ACCESS, // desired security access
NULL, //inheritance

&aphkResult, // key handle
&lpdwDisposition // disposition value buffer
);

showdelay= RegSetValueEx(
aphkResult, // handle to key
"MenuShowDelay", // value name
0, // reserved
REG_SZ, // value type
(BYTE*)lpData, // value data
strlen(lpData)+1); // size of value data
}
 

 

  Home  |  About Me | Thoughts  | Tutorials  |  Projects | Robotics | out's That   


Hosted by www.Geocities.ws

1