Saturday, October 27, 2018

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 invoked by typing "psr." in run. The utility resides in "C:\Windows\System32"
  • To record a problem, click on 'Start Record' and do any actions. 
  • Use mouse and keyboard keys appropriately.
  • It does a screen capture step-wise on every mouse and keyboard events
  • Once done, click on 'Stop Record' and save to any folder.
  • It gets saved as web-page archive file format (.mht)
e.g)
Problem Step 1: (10/26/2018 12:04:38 PM) User mouse drag start on "Recorded Problem Steps (pane)" in "Recorded Problem Steps - Internet Explorer"

<screen-shot>

Problem Step 2: (10/26/2018 12:04:40 PM) User keyboard input in "Recorded Problem Steps - Internet Explorer" [... Ctrl-C] 
<screen-shot>

It is also helpful during software manual preparations as it taken screen shots automatically on each input events.

Wednesday, May 30, 2018

How to make .NET Application using 3.5 or below to run on Windows 10

When user tries to install application that is targeted to use .NET 3.5 or below in windows 10, it may not get installed in Windows 10 directly as it is.

This doesn't mean that windows 10 will not support those application. It does have a provision to make older applications work as intended but needs changes in the feature settings.

Go to Control Panel -> View by, Large icons -> Programs And Features -> Turn Windows features on or off -> select .Net Framework 3.5 (includes .NET 2.0 and 3.0) -> OK


It will ask to download supported files. Give Yes.



Upon download completion of all the required files, try to install the setup files and it will get installed successfully.

Note: Even .NET application targeted for 1.1 can run in windows 10.

Wednesday, May 16, 2018

Change MAC address in windows 10

Below is the steps to change the MAC address in Windows 10.

  • Right click on network icon
  • Under Network & Security choose 'Ethernet'
  • Click on Change Adaptor option and right click on the network adapter for which MAC need to be changed and choose Properties
  • Go to 'Advanced' tab
  • Locate 'Locally Administered Address'
  • In value cell, enter the new MAC ID and click OK.
  • Restart the PC


Tuesday, May 8, 2018

Unwinding windows uninstallation

Have you ever wondered how control panel is able to uninstall programs?

Upon any program installation, the installation details are maintained in below registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}
GUID ->Unique product code set for the product by installer programs.

During uninstall, windows checks for "UninstallString" key value.

Most likely it would contain entry as like below.

MsiExec.exe /X{GUID}
MsiExec.exe -> Windows Installer Program that comes are part of OS installation.

It has many argument and X is to uninstall.

Below example is for ISS 10.0 Express.


Also windows takes a copy of the installer files to "C:\Windows\Installer" with some auto-generated name for which windows has a mapping with product code.


With this, it is able to uninstall a product!

More information:

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...