Pages

Sunday, July 17, 2011

Web communication @ a glance!




Thursday, July 14, 2011

Add an executable to Windows right click menu for a file type






To give a customized menu as given above:


  1. Go to My Computer


  2. In Tools > Folder Options, Go to File Types


  3. Select the file type you want to add the menu item to (Ex: for *.sql - Microsoft SQL Server Query File)


  4. Click "Advanced"


  5. Click "New"


  6. In New Action, give the name you want to appear in right click menu in Action field


  7. Give the absolute path to the executable in "Application used to perform action" field


  8. Click OK.

Monday, July 11, 2011

Get the performance of an application running in Windows


  1. Open Perfomance monitor (Run > Perfmon)

  2. Add new counter (Right click > Add Counters)

  3. Select "Process" as Performance object.

  4. Select the required counters from the list. (Click "Explain" to get the definition for each counter)

  5. Available - executing process instances will be displayed in "Select instances from list"

  6. Select the process related to your application.

  7. Click Add.

All in one 2!



All in one!



Tuesday, June 28, 2011

Create a setup for Visual Studio project

In Visual Studio 2008,


  1. Go to File > New Project > Project Types: Other Project Types > Set up and Deployment >

  2. Select Setup Wizard

  3. Give a name to setup file and location

  4. Click OK

In Setup Project Wizard,



  1. Select "Create a setup for a Windows application"

  2. Browse for additional files such as config file

  3. If there are any dependancies with the other projects in the same solution, specify that as well

  4. Click Finish
In the Visual Studio build the project,
The setup file will be created in Release/ Debug folder in Setup folder of the project.

You can execute the setup file to start installation. Default installation location will be "C:\Program Files\{Solution name}\.."

To run the executable in Windows command prompt, go to the program files folder and give exe. name with the arguments (if any)
Ex: C:Program Files\Test > Test.exe arg1=1 arg2=2 arg3=3

Thursday, June 23, 2011

Get assembly information - CLR header



In Visual Studio command prompt execute the following command:
corFlags.exe {Assembly name - with file path}





Get assembly information - Meta data version



  1. Run Ildasm.exe command in VisualStudio command prompt. (in VisualStudio tools)

  2. Click File > Open > browse for the assembly in file system > Open

  3. Double click "Manifest"

Check the installed .NET versions in machine

  1. Go to Windows Registry. - Type Regedit in Run prompt
  2. Check the following registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\ NDP

Capture first chance exceptions

First chance exceptions will not be captured unless you manually set it to throw in Visual Studio.
But the exception type will display as output. (View > Output - ctrl+w O)

How to throw a first chance exception?

Debug > Exceptions > Add... > Type: Common Language Runtime Exceptions > Name: {name of the exception} > OK > Tick the checkbox in Thrown column > OK

Now, once the exception occurs, it will be thrown in run time.