Wednesday, July 20, 2011

Windows Tips

Using the Remote Desktop Client from the Command Prompt


The Microsoft remote desktop client can be found in %systemroot%/system32/mstsc.exe. Running this program with no extensions will bring up the remote desktop connection program. However, mstsc.exe has a full set of switches that can be used to accomplish things from the command prompt.

mstsc.exe {ConnectionFile | /v:ServerName[:Port]} [/console] [/f] [/w:Width/h:Height]

/v - specifies the remote computer and port (optional) you wish to connect to
/console – connects to the console of a Windows Server 2003 based system
/f – starts the remote desktop connection in full screen mode
/w & /h – specifies the width and height of the remote desktop connection

This can be very useful in creating batch files to use as quick routes to machines with a particular group of settings. For instance, mstsc.exe can be called from a batch file enforced by group policy to run at startup for machines that need to connect directly to a terminal server for use.

Windows Tips

To Prevent Users From Accessing The Computer Tab


You may need to prevent your users from accessing the Computer Tab on My Computer property for security or some other reason. There is no any Group Policy setting available to disable this but you can set the permissions on the NetID.DLL file which implements the necessary functions to show this Tab on My Computer property. You need to use the steps mentioned below to do so:

Steps:
  • Search NetID.DLL file on the local computer.
  • Remove or set the following permissions to hide the Computer Tab.
Administrators - Full Control
Power Users - Read & Execute, Read
System - Full Control


The default NTFS permissions are:


Administrators - Full Control
Power Users - Read & Execute, Read
System - Full Control
Users - Read & Execute, Read 


Note: You can also create a script to deploy the permissions set on NetID.DLL using the Group Policy.

Troubleshootings

How to restore Windows Server 2003 system files

 

Problem:

How to restore Windows Server 2003 system files
How to replace a missing or corrupted system file or driver

Solution:

There are multiple solutions for this:

SOLUTION 1:

Extract the file using the automated System File Checker
      1. Click Start > Run
      2. In the Run dialog box, type the following text:

        sfc /scannow
      3. Click OK.

        The Windows File Protection dialog box appears and a system scan begins.
        You may have to insert your Windows installation CD.
      4. Follow the prompts.

SOLUTION 2:

Use the System Configuration utility to restore a system file(s)
      1. Insert your Windows Server 2003 installation disk into your CD drive or DVD drive.
      2. Click Start > Run
      3. In the Run dialog box, type the following text:

        Msconfig
      4. Click OK.
      5. On the General tab, click Expand File.
      6. In the File to restore box, type the name of the file you want to expand.
        • Or, to locate the file you want to replace, click Browse File, and then click Open.
      7. In the Restore from box, type the path from which to restore the file.
        • Or, to locate the source file you want to expand on your Windows Server 2003 installation disk, click Browse From, and then click Open.
      8. If the Save file in box is not already populated from step 4, type the path to which you want the file to be restored.
        • Or, to locate the destination folder you want to expand the file into, click Browse To, and then click OK.
      9. Click Expand.

SOLUTION 3:

Use Expand.exe at a command prompt to restore a system file(s)
      1. Insert your Windows Server 2003 installation disk into your CD drive or DVD drive.
      2. Click Start > Run
      3. In the Run dialog box, type the following text:

        cmd
      4. Click OK.
      5. In the command prompt type the following:

        cd\
      6. Press ENTER.
      7. At the command prompt, type:

        expand -r

        Where is the path to the file that you want to expand on the Windows Server 2003 installation disk, and is the path to the location where you want to save the file,

        • EXAMPLE:
          expand –r D:\i386\sfc.dl_ %systemroot%\system32
        • Press ENTER.
SOLUTION 4:

Use Expand.exe at from the run line to restore a system file(s)
      1. Insert your Windows Server 2003 installation disk into your CD drive or DVD drive.
      2. Click Start > Run
      3. In the Run dialog box, type the following text:

        expand -r

        Where is the path to the file that you want to expand on the Windows Server 2003 installation disk, and is the path to the location where you want to save the file,
        • EXAMPLE:
          expand –r D:\i386\sfc.dl_ %systemroot%\system32
        • Press OK.

Windows Tips

How to Unhide My File and Folder Caused by Virus

I. Sometimes this infection can be solved by:
  • Going to Windows Explorer
  • Tools menu
  • Folder Option
  • View Tab
  • Choose “Show Hidden Files and Folders”.
  • If the files will show up, simply change the properties of the files/folders. Uncheck the “hidden” checkbox and the files will show again just like before.

II. If the above doesn’t work, and your files are still hidden, do this one that will surely work.
  • Go to the command prompt.
  • Go to the drive where your hidden files are located.
  • Type the following: attrib -s -h /s /d *.* (this will unhide all your files that have been hidden by the virus) i.e. F:\> attrib -s -h /s /d *.*

Windows Tips

What is lsass.exe:

The process lsass.exe serves as the Local Security Authentication Server by Microsoft, Inc. It is responsible for the enforcement of the security policy within the operating system. This process checks whether a user’s supplied identification is valid or not whenever he or she tries to access the computer system.

With the execution of the file lsass.exe, the system acquires security by preventing the access of unwanted users to any private information. The file lsass.exe also handles the password modifications done by the user.

The process lsass.exe mainly operates in the system through its ability to create access tokens. These tokens encapsulate the file’s security descriptor, which contains the necessary information to process user authentication such as data on which user holds access to the system and whether the access is mandatory or discretionary.

What is ntfrs.exe: 
ntfrs.exe is process belonging to Windows. It is used to maintain file synchronization of file directory contents among multiple servers. This program is important for the stable and secure running of your computer and should not be terminated.     

Note:-lsass.exe & ntfrs.exe is a system process that is needed for your Windows system to work properly. It should not be removed. 
 

Windows Tips

1-) How to rebuild the Windows boot.ini.

Users who have a corrupt or missing boot.ini file, are running Microsoft Windows XP, and have a Microsoft Windows XP CD can rebuild the systems boot.ini file by following the below steps.
  1. Insert the Microsoft Windows XP CD into the computer. Note: If you have a system recovery CD or restore CD (not a Microsoft CD) these steps will likely not work for your computer.
  2. Reboot the computer with the CD and press any key when prompted to press any key to boot from the CD.
  3. Once in the Microsoft Setup menu press R to open the recovery console.
  4. Select the operating system you wish to use; if you only have Windows XP on the computer you will only have one prompt.
  5. Once prompted for the password enter the Admin password and press enter.
  6. Once at the command prompt type bootcfg /rebuild to start the rebuild process.
  7. The rebuild process will step you through a number of steps depending upon how many operating systems you have on the computer and how the computer is setup. Below is a listing of the common steps you are likely going to encounter.

    * Prompt for the identified versions of Windows installed. When you receive this prompt press Y if the bootcfg command properly identified each of the Windows operating systems installed on the computer. It is important to realize this command will only detect Windows XP, Windows 2000, and Windows NT installations.

    * Prompt to enter the load identifier. This is the name of the operating system for the boot.ini. For example, Microsoft Windows XP Home users would enter Microsoft Windows XP Home edition.

    * Prompt to Enter OS load options. When this prompt is received type /fastdetect to automatically detect the available options.
Once you have completed all the available options in the rebuild and are back at the prompt type exit to reboot the computer.


2-)To configure the boot.ini file through CMD:
  1. Open a command window and navigate to the root of the boot directory.
  2. Type the following text at the command line.
3.           C:/>attrib -s -h -r boot.ini
This procedure removes the system, hidden, and read-only attributes of the file.
4.      C:/>boot.ini edit
5.      file will open in notepad and now u can modify boot.ini file.