Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Wednesday, September 24, 2014

Commandline to change firewal rules in Windows 7/8

I was looking for a commandline based approach to add new rules on Windows Firewall and it was simple to do:

  • First check if there are already some rules set:
    netsh advfirewall firewall show rule name=**App**
  • Then you add a separate rule for allowing input traffic (as required)
    netsh advfirewall firewall add rule name=**App** dir=in action=allow profile=public program=**App_Location** enable=yes
  • And a separate rule for allowing output traffic (as required)
    netsh advfirewall firewall add rule name=**App** dir=out action=allow profile=public program=**App_Location** enable=yes
  • Finally if required, the rule can be deleted
    netsh advfirewall firewall delete rule name=**App**

Monday, February 25, 2013

Windows 7 : Windows event log error 4201

Today morning, I faced a new problem. When I tried to connect to my VPN, I got the following error:

"Could not start the Remote Access Connection Manager service on local computer. Error 1068. The dependency service or group failed to start."

That is simple. So I went to the Remote Access Connection Manager Service and found 2 dependencies : Telephony and SSL. Started both of them and tried to start the service again: Same Error !!

Hmm.. thats a problem. To know more details, I looked in to the Eventlog and now that too gave an error :

 The service has not started and when I tried to start the service I got the error :  Cannot start windows event log service on Windows 7. Error 4201.

Now that's a bigger problem. Something has gone real bad with my laptop. All the solutions pointed to deleting the "C:\Windows\System32\LogFiles\WMI\RtBackup" directory and to do so I need to go to Safe Mode. Now my company's laptop does not allow you to go to Safe Mode without a password. So what to do.


  1. Make a copy of the folder RtBackup - just to be safe.
  2. Take the ownership of the folder - From System to Yourself and reboot your computer
  3. Now that you are owner - you can delete the folder :)
  4. And yes post restart everything was back to normal.

Wednesday, February 6, 2013

Fix issues with Windows Update in Windows 7

Recently I got a lot of errors while updating Windows 7 from windows update. A lot of errors specially Code 66A was returned.

Tried a lot of things but finally a tool from Microsoft itself worked. Try this out : http://go.microsoft.com/fwlink/?LinkId=231149

Good luck :)

Friday, January 25, 2013

Microsoft Office 2010 icons missing in Windows 7

Since yesterday, I found the icons of Office 2010 files like Excel, Word, PPT's got replaced by the generic file icons.

I looked throughout the web for a solution but nothing worked. The primary solutions put forward were:
  1. Delete the IconCache.db file in %userprofile%\AppData\Local
  2. Create a registry key "Max Cached Icons" in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer and set it to 4096 (4MB) or 8192 (8MB)
Folks talked about fixing the "C:\Windows\Installer\" but the solution was not complete. So the steps are:
  1. Open Registry Editor : regedit.exe
  2. I have taken the example of Excel icons missing. So Navigate to HKCR\AppId\EXCEL.EXE
  3. Look for the value for "Appid". For me the value was "{00020812-0000-0000-C000-000000000046}"  - this may be different for you. So note it down.
  4. No look for the value HKCR\CLSID\{00020812-0000-0000-C000-000000000046}\DefaultIcon (Change the Appid value to what you noted above).
  5. Find the value for "Default". For me it is : "C:\Windows\Installer\{90140000-0011-0000-0000-0000000FF1CE}\xlicons.exe,3"
  6. Now look for this location "C:\Windows\Installer\{90140000-0011-0000-0000-0000000FF1CE}\xlicons.exe" in your drive. If you already have it then it is a different issue for you and look for other solutions in this thread. If you do not have this folder, copy it from some other desktop and it should work.
Good luck :-)

Sunday, April 26, 2009

Solve "Access is Denied" error when opening .msc files

Today I got a very annoying error.


I tried to open services.msc and got the error:



The beauty of this error was the I was able to open the it through : My Computer :: Manage :: Services and Applications :: Services.

I googled through the error and found a lot of replies : Some of them suggesting some software restriction policy of the user not being Administrator and so on.
All did not apply to me as my computer is me personal home computer and not part of any domain and I was able to open it till a few days back (or the last time I openend it) and nothing changed in between.
So whats the issue. I am a Admin. I navigated to C:\Windows\System32 and checked the permissions for the services.msc file and as Admin I had Full Control over the file.

Then I found something special : I was able to execute "eventvwr" but not "eventvwr.msc" which gave the Access is Denied Error.

That was the Euraka moment. It had something to do the MS Management Control or "mmc.exe" which is used to open all these ".msc" files. I openend "mmc.exe" and loaded the snap-in "Services" and it loaded up fine.

Then the solution was simple :: The extension ".msc" has somehow lost the information that it needs to be "openend with" mmc.exe

So I did a right click on "services.msc" and selected "Open with". In the window I browsed to "C:\Windows\System32\mmc.exe" and phew it worked.
I checked "services.msc", "eventvwr.msc", "compmgmt.msc" and all worked fine.

Hope it works for you too :)

Saturday, November 8, 2008

Remotely Shutdown / Reboot your Windows Box

A lot of time, I need to restart a windows server. Earlier I used to make a remote desktop connection to the server which easily took over a minute or two as its a server and logged me to a domain. Then I used to restart it from the gui.

Now I found a way to restart it from my local desktop. The command goes like

shutdown -m \\ -r

where -m is used to specify the machine name and -r is meant to specify that the machine needs to be rebooted.

Then I check for the actual reboot by

ping -t

I see that it gets ping messages back, and then stops responding for some 8-10 pings and then gets back up again.

Now this really saves me a lot of time :)

Sunday, August 3, 2008

How to make Windows icon text transparent?

This happened with one of my friend's laptop. Suddenly we found those ugly background colors coming on top on the cool wallpaper for all icons. To resolve it, we looked over the internet and got this standard answer:
  1. Open the Control Panel
  2. Click System
  3. Click the Advanced tab
  4. Click Settings in the Performance section
  5. Check the "Use drop shadows for icon labels on the desktop" checkbox
  6. Click OK until you close the windows
Problem: This did not work. We had already selected the main option "Adjust for best appearance" which had already checked the "Use drop shadows for icon labels on the desktop" checkbox.

Now what to do. With some more research we came to a simple answer:
  1. Right Click on your Desktop
  2. Under the Arrange Icons By menu, deselect Lock Web Items on Desktop.



And this should do the trick. Else the final solution is:
  1. Right Click on your Desktop
  2. Select Properties
  3. On the Desktop tab, click Customize Desktop
  4. In the Web tab, uncheck all boxes
This should work else contact Microsoft for support :)