Windows NT Tips #3


----------------------------------------------

TipWorld - http://www.tipworld.com
The Internet's #1 Source for Computer Tips, News, and Gossip

Proudly presents:
The Windows NT Tip of the Day

----------------------------------------------

*1.   WHEN WAS THE LAST TIME?

Windows NT Workstation 4.0
Here's a somewhat unusual question from subscriber Todd G.:

"I'd like to be able to determine when Windows NT Workstation
 4.0 was last started on any given computer. I've been told
 there's a way. Can you help?"

The only way we know to find out when Windows NT Workstation
 4.0 was last started requires that you use the Command Prompt.
 At the prompt, type

net statistics workstation

and press Enter. The first line shows the last time the system
 was started. To see the first line, you may need to type

net statistics workstation |more

at the prompt. More causes the program's output to pause at the
 end of the first page.


*2.   SAVE IT AS A REG FILE

Windows NT Workstation 4.0
This question is from subscriber Albert F.:

"When I tell Notepad to save a file such as Regfile.reg, the
 file is saved as Regfile.reg.txt. It appears that Notepad
 insists on using the .txt extension. I have to change the
 file's name to make it a working REG file. Am I
 missing something?" 

The workaround is to enclose the new name in quotes. For
 example, to name your file Regfile.reg, choose File, Save As
 and then type in

"Regfile.reg"

and click Save. This should solve the problem.


*3.   ELIMINATE RUN COMMAND

Windows NT Workstation 4.0
Subscriber Frank L. sent this question:

"Is there a way to eliminate the Run command in the Start menu?
 This would limit access to RegEdit and save me some
 potential problems."

Many administrators like to remove Run from the Start menu. This
 can help keep users from running programs such as RegEdit.
 However, it's only a very minimal security measure, since your
 users can still locate and run RegEdit using Windows
 NT Explorer. 

Since several administrators have requested an easy way to turn
 off the Run command, we decided to write a pair of REG files to
 turn Run off and on.

Remember that a REG file modifies the Registry and that we can't
 guarantee the REG files shown here will do what you expect on
 your Windows NT Workstation 4.0 installation.

You need two REG files--one to turn Run off and one to turn it
 back on. To write the first file, RunOff.reg, run Notepad and
 type the following exactly as shown. Where you see BLANK LINE
 GOES HERE, simply press Enter to enter a blank line.

REGEDIT4
BLANK LINE GOES HERE
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Policies\Explorer] 
"NoRun"=dword:00000001
BLANK LINE GOES HERE

Choose File, Save As and name the file RunOff.reg. Locate a
 folder for the new file and click Save. Now, change the file
 as shown here.

REGEDIT4 
BLANK LINE GOES HERE 
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Policies\Explorer] 
"NoRun"=dword:0 
BLANK LINE GOES HERE 

Choose File, Save As and name the file RunOn.reg. Locate a folder
 and click Save. 

To turn off the Run menu entry in the Start menu, log on as the
 user whose system you wish to change. Now, double-click
 RunOff.reg to merge the new information with the current
 Registry. The next time you restart the computer, the Run
 command won't appear in the Start menu. To get the Run command
 back, double-click RunOn.reg and restart the computer. 


*4.   EXPLORE THE SYSTEM ATTRIBUTE

Windows NT Workstation 4.0
Gail G., a longtime subscriber, asks this Explorer question:

"I recently ran into a situation where I needed to remove the
 system attribute of a file. I right-clicked the file in Windows
 NT Explorer and then chose Properties. I found that the System
 Attribute check box was selected, but grayed out so I couldn't
 change it. Then I checked some other files and folders I knew
 had System Attribute checked. I found that I couldn't change
 any of them.

"Is this normal behavior for Explorer or Windows NT Workstation
 4.0? What can I do to change the system attribute?"

This is normal for Windows NT Explorer (although we suspect it's
 a bug). If you need to change the system attribute of a file,
 first open the Command Prompt. Now, to go to the folder that
 contains the file, type

cd\TheFolder 

and press Enter. Now, type

attrib -MyFile.ext -s

and press Enter. This will remove the system attribute from
 the named file.


*5.   SERVICE PACK 4

Microsoft provides the updates and patches for its NT products
 in Service Packs, the latest available version being 4. The
 patches in Service Pack 4 update files in Windows NT Server
 4.0, Windows NT Server 4.0, Enterprise Edition, and Windows NT
 Workstation. To make it easier to download and install,
 Microsoft has developed three download options from which to
 choose to best meet your needs. One option is Auto-Install,
 which is recommended for individual users and requires that you
 run Internet Explorer 3.02 or later. Auto-Install launches a
 setup file that detects the components on your system. Next, it
 downloads only the files you need from Microsoft's servers,
 updating the appropriate files.

You can download this version of Service Pack 4 from any of the
 following locations:

Intel (x86)

- California: ConXion
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug1%2C00.html
 - Washington, D.C.: ConXion
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug2%2C00.html
 - Chicago: ConXion
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug3%2C00.html

Alpha: 
- California: ConXion 
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug4%2C00.html
 - Washington, D.C.: ConXion 
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug5%2C00.html
 - Chicago: ConXion 
http://www.pcworld.com/r/tw/1%2C2061%2Ctw-bug6%2C00.html


*6.   QUICK START FOR MS-DOS PROGRAMS
  
Windows NT Workstation 4.0 
Subscriber Holly D. sends this command prompt tip:

"If you often use the command prompt window, here's a trick you
 might like to try. Open the command prompt window, then run
 Windows NT Explorer. Use the mouse to drag an icon from an
 MS-DOS program's icon to the command prompt window, then release
 the mouse button. This pastes the complete file name into the
 window. Now click the command prompt window to select it and
 press Enter to run the program."


*7.   COMMAND PROMPT WITH A CLICK

Windows NT Workstation 4.0 
In the last tip, a reader described a way to start an MS-DOS
 program by dragging its icon to the command prompt window. This
 time, let's look at a tip subscriber Steve G. submitted.

"I recently added the command prompt to the menu that opens when
 you right-click a folder in Windows NT Explorer. I thought other
 readers might like to try this."

If you'd like to check out Steve's menu method, run Windows NT
 Explorer and choose View, Options. When the Options dialog box
 opens, click the File Types tab. Now locate Folder and select
 it. Click Edit, then click New. In the Action text box, type

Command Prompt

and in the Application Used To Perform Action box, type

cmd.exe

Next click OK. Back in the Edit File Type dialog box, click OK
 again. When you get back to Options, click Close to close the
 dialog box and save your changes.

Now right-click a folder and choose Command Prompt to open a
 command prompt window at the folder's path. As an example, you
 might have a folder named Data on drive C. Right-click the
 folder and choose Command Prompt. The command prompt window
 opens with the path set to c:\Data.


*8.   CREATE A FOLDER HERE

Windows NT Workstation 4.0
Reader Mark G. wants to know if there's a way to create folders
 with just one click. We don't really know of a way to create a
 new folder by clicking a button, but we do know a way to make
 the job easier (thanks to reader Norm H.).

What you can do is add a New Folder command to the right-click
 menu. Then right-click a folder in Explorer (or on the desktop,
 or in My Computer) and choose the New Folder command.

To do this, run Windows NT Explorer and choose View, Options.
 When the Options dialog box opens, click the File Types tab.
 Now type

fol

to select the Folder entry. With Folder selected, click Edit.
 In the Edit File Type dialog box, click New, and in the Action
 entry box type

New Folder

Press Tab to move to the "Application used to perform action"
 entry box and type

c:\winnt\system32\cmd.exe /c md """%1\NewFolder"""

Click OK to close the dialog box and return to Edit File Type.
 In Edit File Type, click Close. This gets you back to the
 Options dialog box, where you'll click Close to close the
 dialog box.  

Now right-click a folder in Windows NT Explorer, and you find
 the New Folder command. Select the new command, and a new
 folder appears in the selected folder.

Note that to create more than one new folder, you have to rename
 the first one you created. You cannot create two folders using
 the same name, and this method has no way of naming a folder
 anything other than New Folder.


*9.   CLOSE THEM ALL

Windows NT Workstation 4.0
Reader Del V. asks if there's a way to minimize all the open
 windows in Windows NT Workstation 4.0.

If you use a keyboard that has a Windows key, you can simply
 press Windows-M to minimize all open windows. If you later need
 to undo the minimization, press Windows-Shift-M.

You can minimize the active window using the keyboard by
 pressing Alt-Space-N sequentially. To maximize the active
 window, press Alt-Space-X. If you'd like to close the active
 window using only the keyboard, simply press Alt-F4.


*10.   A BETTER EDITOR?

Windows NT Workstation 4.0
If you do much work with batch files in Windows NT Workstation
 4.0, you should consider using Edit.com for the job rather than
 the default editor, Notepad.exe. Why switch editors? For one
 thing, Edit.com allows you to enter and display the extended
 character set some batch files use.

If you'd like to make Edit.com your default batch file editor,
 open My Computer and choose View, Options. When the Options
 dialog box opens, click the File Type tab. Type

ms 

and select MS-DOS Batch File. Next click Edit. When the Edit
 File Type dialog box opens, move to Actions and click Edit to
 select it. Now click Edit, replace Notepad.exe with Edit.com,
 and click OK. Back in the Edit File Type dialog box, click
 Close to get to the Options dialog box. Click Close again to
 close the dialog box.

Restart the computer to activate your changes. With this change
 in place, you can right-click a BAT file and choose Edit to
 open the file in Edit.com. If you later decide you want
 Notepad.exe back, just go through the procedure again and
 replace Edit.com with Notepad.exe.
