AFS and Windows

Today I spend 3 hrs searching for issues with my software (Git and VS) and machine only to find that the issue was really with OpenAFS tokens and that its service was not running even thought it was set to start automatically.

If only windows would have notified me at startup that this svc. Was not started properly, I would have known what the f was going on, instead of beating my head at random places doing shit for 3 hrs.

Thanks Windows. Swallow all errors always….All I’m waiting for is your Blue Screen and Death anyways..i hope I Die before your blueness manifests.

Working with VBScript accessing COM Component


Recently I had to debug an .asp file using <%@ Language=VBScript %>

The issue is that it mentions Set p = Server.CreateObject(“a.b”),

Now what is a.b here ? and where is it present ? in the VD there is only this one asp file

server.createobject in vbscript


Turns out that a.b is a COM component that is being used here.

Next I want to find out the Registration Entries for this component from the Windows Registry :

Late Binding with a VBScript Client

Late-binding is so called because you don’t know if the methods exist until run-time. Late binding is based on the standard COM IDispatch interface, which has methods that return information about the methods and properties on an interface so that they can be discovered at run time. As an analogy, it’s somewhat the equivalent of using .NET reflection to find the structure and methods of .NET classes.

This is the VBScript:

dim obj,amsg
set obj = CreateObject (“CallPDW.Class1”)
amsg = obj.GetMyString
msgbox amsg

Just to state the obvious, there’s no checking that any of the methods such as GetMyString actually exist with that parameter structure when you write that script. This is discovered when you run the script using the IDispatchinterface on the object.


Calling COM Components from ASP Pages:


Getting rid of Microsoft Office Communicator 2007 R2 Flashing Taskbar Notifications

If there is one Product from 2007 that I am using, it this…

The main issue I have with it is that It shows hideous distracting Flash when someone sends me a message.

Finally I got sick of it and tried ways to get rid of it online:

  3. Another thing that I tried is that First I enabled sound notification for MOC and then from the control panel setting I enabled sound notification as visual by selecting Flash the screen and Flash current Active Window, but none of those actually worked very well…

Using Windows Hosts file

Here is its Wiki:

Beginning with Windows 7, name resolution for localhost is handled internally by DNS itself, so its definition isn’t required in the Hosts file and these entries are now commented out with the # character in the default hosts file.

Location: C:\Windows\system32\drivers\etc


The ARPANET, the predecessor of the Internet, had no distributed host name database. Each network node maintained its own map of the network nodes as needed and assigned those names that were memorable to the users of the system. There was no method for ensuring that all references to a given node in a network were using the same name, nor was there a way to read the hosts file of another computer to automatically obtain a copy.

The small size of the ARPANET kept the administrative overhead small to maintain an accurate hosts file. Network nodes typically had one address and could have many names. As local area TCP/IP computer networks gained popularity, however, the maintenance of hosts files became a larger burden on system administrators as networks and network nodes were being added to the system with increasing frequency.

Standardization efforts, such as the format specification of the file HOSTS.TXT in RFC 952, and distribution protocols, e.g., the hostname server described in RFC 953, helped with these problems, but the centralized and monolithic nature of hosts files eventually necessitated the creation of the distributed Domain Name System (DNS).

On some old systems a file named networks is present that has similar to hosts file functions containing names of networks.


This is what I have always used the HOSTS file for:

Internet resource blocking

Specially crafted entries in the hosts file may be used to block online advertising, or the domains of known malicious resources and servers that contain spyware, adware, and other malware. This may be achieved by adding entries for those sites to redirect requests to another address that does not exist or to a harmless destination, e.g., localhost. [8]

There are software applications that populate the hosts file with entries of undesirable Internet resources automatically.



Your browser first checks your hosts file to see if it has an IP address for If the hosts file has an entry it is used, otherwise a domain name server is queried to get the IP address of (Yes, technically, you can enter that IP address into your browser’s address bar and get to


One benefit of using the hosts file is precedence. Most systems access this file first because it’s loaded into the computer’s memory at start up. There are some exceptions such as people who use proxy servers.


When various types of Internet advertisements became invasive, some people used the hosts file as a means to bypass the ads. People would add an entry to their hosts file that redirected an ad server away from the intended destination. Or, using our analogy from above we could redirect the New York Times traffic to your home address.


This redirection can be accomplished by adding a line such as the following to the hosts file: # ad server for XYZ company

In the above example, when your web browser encounters a request for, it would look in the hosts file and find the entry This IP address is a universal address assigned to the localhost that is your PC. So, rather than going to the true IP address for the XYZ ad server, the request would stop at your PC and the ad wouldn’t appear. You can also add a # sign and comment to identify the site.



Windows Service Tips

A windows svc. Can be configured to run under any account.

Please follow the instructions to deploy your windows service under a specific account:

  1. Run  this command in command prompt : c:\WINDOWS\Microsoft.NET\Framework \ v4.0.30319\installutil “Physical Path of the Service”. This will install the service.
  2. Now open services.msc
  3. Right click on your svc. and open its Properties
  4. In the Log On Tab, enter the credentials of the Account that you want to run the service under.
  5. Click Apply, and start the service.

Note that there are two ways to assign the minimum rights required to run a windows service as a domain account:

  1. Edit the properties of the service and set the Log On user. The appropriate right will be automatically assigned.
  2. Set it manually: Go to Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment. Edit the item “Log on as a service” and add your domain user there.

I have used 1 in my instructions above and have verified that it works for Windows Server 2003 and Windows 7.