Tuesday, April 24, 2018

Microsoft Visual C++ Redistributable and Runtime Package

Microsoft redistributable package includes runtime to run our program on target PC which was developed using Visual Studio.

The important point to note here is there are various MS redistributables available.

It is important to have the right version of redistributable to be installed on target PC.

It depends on the version of visual studio that was used for developing the application.

For instance, if vs2005 was used for developing an application, then vs2005 redistributable package should be installed on target PC for running the application.

In some cases, few projects/third party components used in the project could have been developed in other version of VisualStudio, then both redistributables are required to be installed in target PC.

Note: Right architecture (x86/x64) need to be installed. If the application/dll is 32 bit, then install x86 version of run-time.

















For vs2010, it was distributed in the name as Runtime for x86/x64 based on the architecture supported by the application.

The Microsoft Visual C++ 2010 Redistributable Package installs runtime components of Visual C++ Libraries required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2010 installed. This package installs runtime components of C Runtime (CRT), Standard C++, ATL, MFC, OpenMP and MSDIA libraries.

More information:
what_is_a_redistributable_package

Monday, April 23, 2018

Windows Networking Utilities - TCPView and Tcpvcon

TCPView

One of the Windows Networking Utilities is used to view all the TCP and UDP end points in the system. We can also close any suspicious or unwanted connections. It is basically a subset of Netstat program.

It helps to narrow down ports that is being occupied by some other program. If so, we can re-configure to some other free ports in that system.

We need to make sure that we have our program is designed in a way to configure port no. rather than hard-coding it in software.

We can use registry, INI or other means to configure it and make program pick from it to establish the connection.

TCPVcon

Command line utility with similar functionality.

The interesting part is we can limit the results to specific process ID and display it in CSV format.

We can very well output to some text file.

Tcpvcon -c 1234 > D:\Result.txt

Note: 1234 is process ID and not port no.

Incorporate the command into batch files to run on target machine. This will help to investigate issue on customer PCs.

Use -c to know connection established to the port.

Use -a to check if process is listening to which port.

Tcpvcon -a 1235 > "D:\Result2.txt"

Reference: https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview


Thursday, April 12, 2018

Migrating from Visual Studio 2010 to 2015

Visual 2015 has many good features and is one good choice to move our development platform from VS2010 to 2015.

Before doing that we need to make sure some of the items below.

  • Target OS on which our application will be deployed
  • Supported Architecture. x86/x64/both. 
  • Supported .NET Framework versions
  • ThirdParty controls used in the project
  • Using remote tools for Remote Debugging (VS2015 doesn't support xp and 2003)
  • Platform toolsets and runtime libraries
Feature rich 2015 has option to support XP as well by keeping the desired XP toolset in Platform Toolset property.

More information:
Visual Studio 2015 Platform Targeting and Compatibility:
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2015-compatibility-vs

Configuring Programs for Windows XP
https://msdn.microsoft.com/en-us/library/jj851139.aspx

Problem Steps Recorder:- To capture keyboard, mouse event with screen shots

Problem Steps Recorder, also known as PSR, is an utility provided by windows and available since Windows 7. (see below). It can be invo...