Posts

Showing posts from June, 2015

Featured Post

Smart Product designer

Image
download and purchase link: https://alkanyx.com/item/49/Smart+Product+designer

Live preview : http://smartproductdesigner.000webhostapp.com/

Smart Product Designer is a  tool to create your own product and get directly from your website. It is well documented, very easy to customize and use. It is build using most advance technologies including javascript, jQuery and html5.
Features Choose different product from collectionAdd custom texts to product.Change text colorChange the size and font of the TextLet the user drag, move or remove elementsAdd images to product selected from art gallery or browse it from systemDesign both frontside and back-sideShows preview while designingDownload designVery easy to customize and useHere is the purchase link : https://alkanyx.com/item/49/Smart+Product+designer

Access 64-bit HKLM\Software registry by 32-bit C#.NET application

Access 64-bit HKLM\Software registry by 32-bit C#.NET application


While running 32-bit windows application on a 64-bit windows OS their is a registry redirection. Here if 32-bit application try to read a key under HKLM\Software, then due to Registry redirection effective path becomes HKLM\Software\Wow6432Node. For example, we are running 64-bit and 32-bit application to read registry keys as HKLM\Software\xyz and HKLM\Software\Wow6432Node\xyz

So by default with an input of HKLM\Software, 64-bit application will read HKLM\Software\xyz while because of registry redirection 32-bit application will read HKLM\Software\Wow6432Node\xyz.

In C#, to read 64-bit HKLM\Software registry keys we can use RegistryKey.OpenBaseKey method. This method takes two arguments- RegistryHive and RegistryView. Here sperate registry views are present for 32-bit and 64-bit.

Here is the sample C# code to read AppPaths for 32-bit and 64-bit applications installed on the system -


try
                {
               …

Extract icons of Installed Windows Application using C#. NET

Icon of Installed Windows Applications

First we need to figure out the location of icon for the installed windows application. This information is stored in registry at following locations -
1. Key name - HEKY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
   Value    - DisplayIcon

2. Key name - HKEY_CLASSES_ROOT\Installer\Products\{productID}
   Value - ProductIcon


first try to get location of icon from HEKY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. Here if the value of DisplayIcon is null then try to fetch location of icon from HKEY_CLASSES_ROOT\Installer\Products\{productID}


Here is the sample code to read the icon -


using system.Drawing //read HKEY_LOCAL_MACHINE Icon ProductIcon; privatevoid ReadIcon() { try { string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey)) {������������������…