Saturday, February 13, 2010

Visual Studio 2008 failed to start

One funny problem just happened with my computer for the second time in half-a-year.
Visual Studio 2008 (MS VS2008 SP1 with ATL fixes) suddenly refused to run and displayed the following problem: "Cannot find one or more components. Please reinstall the application".

This thread contains the detailed desciption of the problem and similar user stories:
It actually helped me very much to resolve this problem for the first and second times.

The second time it was the same file, but I still don't know what kind of software/installation removed it.


The easiest way to restore it is to download and install vcredist_x86 (redistributable for Visual C++ 2008 SP1 with ATL security update) from here (if your computer is missing the same file):

I wouldn't recommend copying atl90.dll from any x86 directory inside WinSxS since they all different versions, and this one actually contains some security fixes.

P.S. You need to start profiling (F7) in depends (Dependancy Walker, rocks!) to see which dlls are really required and missing on your system.

Tuesday, February 2, 2010

Mikrotik RouterOS and domain (active directory) DNS requests forwarding

I'm using mikrotik router at home, with RB150 constantly handling connection to provider (PPPoE) and to my office (VPN over internet).
However since router is using provider's DNS, it is not possible to work with shared folders or perform any other domain tasks (while office IPs are readily accessible). Anything using active directory will fail, since any computer in home won't be able to resolve domain controllers.

How to fix this:
1. added layer7 matcher for \x06\x5Fmsdcs\x08mydomain\x03com
(you need to replace with your domain address).
each domain part preceded with \x and number of characters in hex, \x5F is  _ symbol.
whenever computer tries to find active directory servers it requests for multiple DNS records all ending with

/ip firewall layer7-protocol
add comment="" name=activedirectory regexp=\

2. added mangle to mark dns request packets matching our layer7 rule and our dns server as destination

/ip firewall mangle
add action=mark-packet chain=prerouting comment="" disabled=no dst-address=\ dst-port=53 layer7-protocol=activedirectory \
    new-packet-mark=activedirectory passthrough=yes protocol=udp

3. added dst-nat rule to route active directory specific requests to actual domain server

/ip firewall nat
add action=dst-nat chain=dstnat comment=\
    "forward active directory DNS requests" disabled=no dst-port=53 \
    packet-mark=activedirectory protocol=udp to-addresses= \

that's all. it works, at least in my particular configuration.
may be there are easier solutions, but I wasn't able to find any.