To lock a folder ::: Simplest WaY !!!

Hi friends try this..

first select a folder for example i'll use a folder name movies in D drive D:\movies
in the same drive u create a text file and type

ren movies movies.{21EC2020-3AEA-1069-A2DD-08002B30309D}

and save it as loc.bat

again u type in a notepad as

ren movies.{21EC2020-3AEA-1069-A2DD-08002B30309D} movies

and save it as key.bat

now in D drive u can see two batch files loc and key.. when u double click loc the movie folder will change to control panel and whn u double click key the control panel will change to normal folder..

Try this out .....

ENJOY !!!!!!!!!!

Dynamically changing TCP/IP DNS addresses

If you connect to the Internet, a Domain Name Server (DNS) is generally required to convert English Internet addresses to their natural numeric IP addresses -- to convert www.chami.com to 1.2.3.4 for example.

If you have a need to dynamically change your DNS servers from your program, you can do so by calling the the following "SetTCPIPDNSAddresses()" function with a list of DNS IP addresses separated by a single space.

Listing #1 : Delphi code.
uses Registry;

procedure
SaveStringToRegistry_LOCAL_MACHINE(
sKey, sItem, sVal : string );
var
reg : TRegIniFile;
begin
reg := TRegIniFile.Create( '' );
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.WriteString(
sKey, sItem, sVal + #0 );
reg.Free;
end;

Listing #2 : Delphi code.
procedure
SetTCPIPDNSAddresses(
sIPs : string );
begin
//
// if using Windows NT
//
SaveStringToRegistry_LOCAL_MACHINE(
'SYSTEMCurrentControlSet' +
'ServicesTcpipParameters',
'NameServer',
sIPs );

//
// if using Windows 95
//
SaveStringToRegistry_LOCAL_MACHINE(
'SYSTEMCurrentControlSet' +
'ServicesVxDMSTCP',
'NameServer',
sIPs );
end;

For example, if you want to set two DNS server addresses -- 1.2.3.4 and 5.6.7.8 here's how your function call would look like:

Listing #3 : Delphi code.
SetTCPIPDNSAddresses(
'1.2.3.4 5.6.7.8' );

Writing your first BATch file

Generally speaking, batch files (files with the BAT extension such as AUTOEXEC.BAT) are text files that can contain a list of multiple commands to be executed. For example, you could write a BAT file to copy multiple files or change the directory or anything you can do using the "Command/DOS Prompt" commands.
It's very easy to create BAT files:

Go to the "DOS Prompt" or "Command Prompt"
Type following commands in red line by line (press ENTER after each line):


COPY CON MYBAT.BAT

ECHO Hello, world! This is my test BAT file!

CD C:\WORK\9TO5\FOLDERA
DIR C:\WORK\9TO5\FOLDERA

^Z


Please note that "^Z" is a single character produced by pressing CTRL+Z

Run newly created BAT file by typing "MYBAT" and pressing ENTER.
In the above code, we're first saying "hello" to the world, changing the current directory to "C:\WORK\9TO5\FOLDERA" (example directory - you may type in your mostly visited directory here), and finally getting the directory of "C:\WORK\9TO5\FOLDERA"

Although we used the command line to create "MYBAT.BAT" itself, you can create your future BAT files using any text editor. You can then experiment with different commands in your new BAT file.

Creating new domain names (for personal use)

Did you know that you can easily create your own domain names for your personal use on your computer? The method we're going to describe could come in handy many ways:

You can map your current home page domain name (at your internet service provider's server) to use your own domain name such as MyCompanyName.com; for fun, or to help you test your HTML pages with your own domain name.
On a local network (or an intranet) you can use your own domain names to access local and remote resources (web servers, etc.)
You can create shorter and easier to remember domain names (or aliases) for already existing domain names.
If your DNS server is slow, you can speedup the access to certain domain names a bit.
Here's how to...

Locate or create a file named HOSTS
If you're using Windows 95, this file should be in the Windows directory ("C:\WINDOWS" for example).
If you're using Windows NT, HOSTS file should be in the "%SystemRoot%\system32\drivers\etc" directory ("C:\WINNT\system32\drivers\etc" for example).
Use your favorite text editor (Notepad for example) to add entries to the HOSTS file. All entries to the HOSTS file should be in the following format:



For example, let's say you want to create a domain name [alias] for a known domain name -- "www.chamisplace.com" for example. First, find out the IP address of the "known" (or already existing domain name) by typing the following command at the "DOS or Command Prompt:"

PING

or according to our example:

PING www.chamisplace.com

Record the IP address for that domain -- 206.105.42.1 for example.

Now, decide what your new domain name for www.chamisplace.com should be -- let's say you want to call it "tipssite.com" (something easier to remember).

All you have to do to map tipssite.com to www.chamisplace.com is to add the following line to your HOSTS file:

206.105.42.1 tipssite.com

Now you can access www.chamisplace.com by using tipssite.com instead -- http://tipssite.com/ for example.