Disable EFS on Windows XP using EfsConfiguration registry key

Friday, November 13, 2009 0 comments

To disable Encrypting File System feature on a System, administrators can run the below command from command prompt.

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EFS" /v EfsConfiguration /t REG_DWORD /d  1 /f       



This works on Windows XP and Windows 2003. It does not seem to be working on Windows7, looks liks EFS registry keys are changed in Win7.

Disable Automatic updates command line

Wednesday, November 4, 2009 4 comments

We can disable windows automatic updates from command line using the below command.


reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f 

I have tested this on Windows XP and Windows server 2003 and it works perfectly. After running the above command you can also see a balloon popping up near the system tray with the message "Your computer might be at risk... Automatic updates is turned off......".

To enable automatic updates we need to set the registry value to 0. Command is given below.

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f

Launch disk defragmenter from Run window

Tuesday, November 3, 2009 0 comments

Disk defragementer utility can be launched from command line or from Run window using the below command.

dfrg.msc

This command works only for Windows XP and Windows Server 2003 operating systems. Disk defragmenter tool has gone through complete makeover in Windows Vista and Windows 7.

The new disk defragmenter tool available in Vista and Windows 7 can be launched by running dfrgui from command line or from Run command.

Snapshots of running the dfrg.msc command from Run window and of the Disk Defaragmenter window are shown below.






Launch add hardware wizard command line

We can launch 'Add Hardware Wizard' from command line using the below command.

hdwwzd.cpl

This command can be used from command line as well as from Run window. Below is snapshot of this wizard.



How to clear windows run history

Windows stores the list of the commands we execute from Run window. This can be seen by clicking on the drop down list in Run window.



This history of command is stored in a per user key in registry database. One can clear this command history by cleaning up the entries under this registry key.

This registry key is

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU

So to cleanup command history we can simply run the below command from command prompt.

reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f 


Note that after running the above command you would still be able to see history for the current login session. Once you logoff and login back you won't be able to see the history.

Clean up Internet Explorer URL cache command line

Monday, November 2, 2009 0 comments

We can clear the cache of URLs stored in the address bar of Internet Explorer(IE) from command prompt too.

This can be done by editing the values under the regtistry key TypedURLS which stores the list of URLs. This registry key editing can be done from command line using the command Reg

So to cleanup the URL cache, we need to run the below command.

reg delete "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs" /va /f 

Note that this only clears the URL cache showin in the address bar. It does not remove the histroy of all the previous URLs visited.

Launch Automatic updates window command line

We can launch auto updates window from command line using the command 'wuaucpl.cpl'. This can be used from Run command too.



This will launch Auto update window where you can configure whether updates should be automatically installed or not.