|
|||
| See also: |
|||
Worried that someone who uses your computer may have access to your ISP password? You have a good reason: Internet Explorer tucks the password in the Windows Registry, where it can be found manually. To delete it, you'll have to open the Registry Editor. Before you do, back up these files: user.dat, user.da0. system.dat, system.da0. Now select Start, Run, type regedit, and click OK. Select Edit, Find and type in your password, then delete the password. If you're running Internet Explorer and you've recently updated your Web site, you may also find your password stored as an FTP Web address in IE's Typed URLs folder. To get rid of it, highlight the entry and select Edit, Delete. Keep an eye on (and delete) Netscape's History file. If you type about:global in Netscape's Location box, you get a list of all the Web sites you've visited in who-knows-how-long. What you're looking at is the contents of Netscape's history file. To keep your surfing private, delete the file netscape.hst in the Netscape directory. Certain Web sites place special "cookie" files on your system that let them recognise you the next time you visit and possibly track where you go in between. Cookies add some convenience to your life; for instance, if a site can recognise you by a cookie on your computer, you probably won't have to type in a password at every visit. But cookies can invade your privacy by tracking which sites you visit and giving marketers a profile of your interests, so you may want to turn them off. In N3, select Options, Network Preferences, click the Protocols tab and, in the Show an Alert Before box, check Accepting a Cookie. In N4, select Edit, Preferences, choose Advanced, and select Warn me before accepting a cookie. Or, if you'd like the browser to reject cookies without asking you, select Disable cookies. In IE3 or IE4, select View, Options and click the Advanced tab. In IE3, select the box marked Warn before accepting cookies. In IE4, just to make things confusing, you must deselect Do not warn before accepting cookies. When you consider just how eager most Web surfers are
to hide all traces of their URL visits, you would think
that Netscape and Microsoft would have included a few
privacy features in their browsers. It wouldn't be hard
to make Navigator or Explorer automatically erase cache
directories, bookmarks, history and temporary files and
even clean out URLs from Windows 9x's Registry after a
user logs off the Internet. But neither browser does.Both browsers do have features that will erase bookmarks and history files globally, and Navigator even lets you erase the disk cache where it stores graphics from the Net, but it makes you pick through labyrinths of menus. Neither browser is equipped to clean up these things automatically after Web surfing session. And neither offers an easy way to block cookies. With Microsoft's Tweak UI you can enable the Paranoia options to clear Internet Explorer's history file. But it won't erase any URL's from the Registry. Nor will it exterminate cache directories and temporary files. Also, you need to shut down Windows and restart or reboot for the purge to take effect. But there is a more complete solution: a batch file that deletes all history and temporary files, the cache directory and cookies. The table below shows sample batch files for both Netscape Navigator and Internet Explorer. If you're running Windows 9x, you can launch your batch file by clicking on a desktop shortcut after you close your browser. To create the shortcut, find the batch file in Windows Explorer, right-click and drag it to the desktop, then select Create Shortcut Here from the resulting pop-up menu. If, after running one of the batch files, you get any 'Access Denied' messages, restart Windows 9x and run the batch file again. To know more about batch files see 'Understanding Batch Programs' below. For Netscape Navigator echo y>c:\windows\tempor~1\y.txt del c:\progra~1\netscape\naviga~1\cache\*.* <c:\windows\tempor~1\y.txt del c:\progra~1\netscape\naviga~1\cookies.txt del c:\progra~1\netscape\naviga~1\netscape.hst del c:\windows\cookies\*.* <c:\windows\tempor~1\y.txt del c:\windows\history\*.* <c:\windows\tempor~1\y.txt del c:\windows\tempor~1\*.* <c:\windows\tempor~1\y.txt For Internet Explorer echo y>c:\windows\tempor~1\y.txt del c:\windows\cookies\*.* <c:\windows\tempor~1\y.txt del c:\windows\history\*.* <c:\windows\tempor~1\y.txt del c:\windows\tempor~1\*.* <c:\windows\tempor~1\y.txt As you work with DOS, you'll find yourself repeatedly typing identical sequences of commands. For example, you might often type the same three commands to change the current drive, change the current directory, and then start a program. By using DOS, you can store commands in a batch program or batch file. Instead of typing commands individually, you need only type the name of the batch program. DOS carries out this "batch" of commands as if you had typed the commands individually from the keyboard. A batch program is an unformatted text file that contains one or more DOS commands. For example, a batch program might contain the commands you use to change your directory and start a text editor. Suppose you are backing up files to a floppy disk by using the following commands: cd \work\docfiles copy *.txt a: cd \reports\xfiles copy *.txt a: To put these four commands into a batch program. you store them in an unformatted text file and assign the file a .BAT extension. Each time you want to back up your files, you type the name of the batch program at the command prompt. Using batch programs has the following advantages: Batch programs speed up your work. When you run a batch program, you only have to remember one command, instead of several. You don't have to retype multiple commands or look up commands you can't remember. Batch programs customize DOS. Using batch programs, you can create personalized commands that perform the exact task you need. You can also design your own prompts and messages. Batch Commands Any DOS command you use at the command prompt can also be put in a batch program. In addition, there are eight DOS commands that are specially designed for batch programs. The commands and their functions are as follows: call Runs a second batch program, and then returns to the first one echo Displays messages on your screen, or turns the echo feature on or off for Carries out a command for a group of files or directories goto Switches to commands in another part of your batch program, and continues processing commands from that point if Carries out a command based on the result of a condition pause Temporarily stops your batch program from running; your program starts running again when you press any key rem Annotates your batch program so that you can remember what each part of the program does shift Changes the position of replaceable parameters Tools for Creating a Batch Program You can create a batch program by using the copy command. If you use a text editor to create a batch program, save your files as unformatted (ASCII) text. Most popular text editors have an option for saving files this way. If you are creating a small batch program, it may be more convenient to use the copy command. Naming a Batch Program A batch program must have a .BAT filename extension. It is generally not a good idea to give a batch program the same name as an existing DOS command. Suppose, for example, that you create a batch program for a customized formatting command and name it FORMAT.BAT. The program won't run if DOS finds the FORMAT.COM file before it finds FORMAT.BAT. because DOS gives precedence to files with .COM and .EXE extensions. You can avoid this problem by using a name that is not already assigned to a DOS command. For example, you could name the program MYFMT.BAT. Running a Batch Program To run a batch program, you type its name without the extension. For example, to run a batch program named FILES.BAT, type the following command: files If the batch program has parameters, add a space after the filename. For example, if the FILES.BAT program requires a file specification as a parameter, you would type a command like this: files c:\reports\data By default, DOS displays each command in a batch program as the command is carried out. After the batch program runs, DOS might display two command prompts because it treats the end-of-file character in a batch program as a new line. Stopping a Batch Program If you want to stop a batch program before all, of its commands have run, press CTRL+C or CTRL+BREAK (more than once, if necessary). You get a message asking to confirm that you want to stop the batch program. Press y to stop the program or n to continue with the next command. You can temporarily stop a batch program by pressing CTRL+S or the PAUSE key. This ''freezes" the screen until you press another key. If your batch program is on a floppy disk and you remove the disk while the program is running, DOS displays the following message: "Not ready reading drive A. Abort, Retry, Fail?" To continue running the batch program, reinsert the disk and type r. Testing a Batch program It is generally best to a create a large batch program in stages. This ensures that one part of the batch program works before you create another part. When you run a batch program that contains an invalid command, DOS cancels that command and proceeds to the next. If the batch program is set up to display commands as they are carried out, you'll see an error message when a command is invalid. If commands aren't displayed, the batch program contains an echo off command. Remove any echo off commands if you want commands to be displayed along with the error messages. For more information about the echo command, see "Displaying Messages with a Batch Program" later in this page. Testing a a Small Batch Program You can use the copy command to create a batch program directly from the keyboard. Suppose, for example, you want to create a batch program that formats a floppy disk in your floppy disk drive. To create the program and name it MYFMT.BAT, use the following copy command: copy con c:\myfmt.bat DOS moves the cursor to the next line. At this point, the file is empty. To add the format command to the file, type the following: format a: Now you are ready to close the file and return to the command prompt. You do so by pressing CTRL+Z and then ENTER. Once you have created the batch program, you need only type the name of the batch program to format a floppy disk in your floppy disk drive, as follows: myfmt DOS displays the format command on the screen, and then prompts you to insert a disk in drive A. (Insert new diskette for drive A: and press ENTER when ready...) (Make sure the directory that contains this batch program is either current or in the directory search path.) The following batch program, BAKIT, is also small enough to create by using the copy command: copy con c:\bakit.bat The program backs up onto a floppy disk in drive A all .TXT and .BAK files from two directories on a hard disk, and then displays a list of the files on the floppy disk: copy c:\work\may\*.txt a: copy c:\reports\may\f.bak a: dir a: If there are more than a few lines in your batch program, it's a good idea to use a text editor to create the file. Displaying Messages with a Batch Program In Brief If you want DOS to display a message, use the echo command in your batch program, as follows: echo Batchworks Backup Builder To stop DOS from displaying commands as it carries them out, use the following command: echo off You can include messages in a batch program to prompt you for additional information or to remind you of a particular task that the batch program does. If you want DOS to display a message on your screen, use the echo command. For example, you would use the following command to display the message "Put a disk in drive A": echo Put a disk in drive A DOS displays this message on the screen. If you want the message shifted to the right a certain number of spaces, you must include the spaces as part of the message. For example, to center the message on your screen, add the necessary spaces in the command, as follows: echo Put a disk in drive A If you want to skip a line, type echo followed by a period: echo. If echo is on, DOS displays batch commands at the command prompt as it carries them out. Therefore, the message in the preceding example ("Put a disk in drive A") is displayed twice: first at the command prompt as part of the batch command, and then as a prompt to carry out the command itself. To suppress commands that appear at the command prompt and display a message only once, use the following command: echo off For example, you could add an echo off command at the beginning of the BAKIT.BAT program (described in the previous section): echo off copy c:\work\may\*.txt a: copy c:\reports\may\*.bak a: cls echo Here are the files on the backup disk: echo. dir a: /p This batch program backs up files with a .TXT extension in one directory and files with a .BAK extension in another, then clears the screen and displays directory listings, one screen at a time. None of the commands listed after the first command (echo off) are displayed while the batch program is running. The line of text following the second echo command is displayed. If you want commands to be displayed, use this command at the beginning of the program : echo on Contrary to what you may have heard, all PCs still run plain old fashioned DOS as the operating system. Even Windows 9x machines, but Win 9x does a pretty good job of hiding the fact so you may not have noticed. However, soon or later you'll need to get to grips with this character-based command-line interface. When you switch on your brand new Windows 9x PC it first loads DOS and then proceeds to load Windows on top. Win 9x is really just a fancy menu system- an easy and convenient way of accessing programs and files. Why might you still need DOS? For the most part, you don't need it, but there are occasions where you might. It all depends on what sort of software you run on your PC. If all you run is Windows wordprocessors, databases and spreadsheets you probably won't need DOS, but if you run games-particularly old ones - then learning some basic DOS commands is essential. Not only that, but for some tasks. DOS is still better that windows. With Windows 9x you can press F8 when you hear the PC beep or it says Starting Windows 9x... and a menu will be displayed. Select "Command Prompt Only" and the PC stops booting when DOS has loaded. Alternatively, you can wait until Windows 9x has loaded, then click Start, Shutdown, Restart the computer in MS-Dos mode. You can also open a DOS window by selecting MS-DOS from the Start, Programs menu. Some commands are built in to DOS, but others are really utility programs that are run when you type the command. These programs are stored either in the C:\DOS directory (old PCs) or the C:\WINDOWS\COMMAND directory (new PCs). To change to a directory (sometimes called a folder) you use the CD command followed by the name of the directory. On old Win 3.1 systems to get to the DOS directory you would type: CD \DOS but if you have Win 95 you would need to type: CD \WINDOWS CD COMMAND or CD \WINDOWS\COMMAND CD means Change Directory and the directory to change to immediately follows. The backslash before the directory name (as in \DOS) tells the CD command where to start looking for the DOS directory. In this case, \ means the root of drive C:-the top of the directory tree, or the start of the disk if you like. So, CD looks at the start of the disk for the directory called DOS and then changes to it. The Win 9x version of this is a two step process: First change to the \WINDOWS directory, then change to the COMMAND directory. These two steps can be combined so that you immediately jump to the COMMAND directory in one step. The last line above does this by telling DOS exactly where to find the directory. The \WINDOWS\COMMAND part tells Dos to look in the root \ of drive C: for windows, then look in the WINDOWS directory for a subdirectory for the COMMAND directory. Once you have changed to another directory you will probably find that the prompt changes to C:\DOS> or C:\WINDOWS\COMMAND> to reflect the new location on the hard disk. In this way, you always know where you are. |
|||
|
Greece - View more...[+] ![]() |