Tuesday, December 30, 2014

2014 was a mixed year

2014 was a mixed year. I lost my brother Dr. Vijaya Raghavan Krishnaswamy, a neuro-surgeon by profession. He left a void that cannot be filled.

I did not complete the book I was writing.

Regarding the blogs I did quite well with a record number of posts.
                                                 Year   Posts
Hodentek.blogspot.com           2013   94
                                                 2014   246

HodentekHelp.blogspot.com.  2013.  17
                                                 2014   56

HodentekMsss.blogspot.com   2013   34
                                                  2014  48
HoentekMobile.blogspot.com  2013   13

I started a new blog in 2014- http://hodentekPlus.blogspot.com.

I also found that a certain person was pilfering (http://hodentek.blogspot.in/2014/12/domain-name-service-dns-and-dns-changer.html) entire content from blog, my hardwork of about 10 years. I complained to Google without any success. I suppose this is not on Google's priority. Google wants every post that is stolen with proof of content stolen. There were over 900 posts in my blog and you can imagine the work involved.

Sunday, December 7, 2014

What is LINQ?

We know that a query is a question we pose to the database to retrieve some information that we would like to know. For example, in a database that consists of men and women, you may want to know how many men and how many women. Let us go a step further and say that there are people of all nationalities in the database of men and women. You may want to know how many women who hail from Europe are there. This is only filtering of the information but a query can much more complex. This is of course querying a database, let us say a relational database such as the SQL Server where you use the Structured Query Language(SQL), a special language you have to learn.

All data are not in relational databases and they could be in some kind of an XML document, a web service or something else. For example, in order to find some filtered content in an XML document you would use a language called XQuery which is not the same as SQL. This means there is need to learn another query language.

Beginning with Visual Studio 2008 and .NET Framework 3.5 Microsoft introduced LINQ which stands for Language-Integrated Query an innovation that made it possible to query a SQL Server database, an XML document, Web Services etc with a single lanugage and it is a first class query language.

In Visual Studio you can write LINQ in both VB and C# for any collection that supports IEnumerable or the generic IEnumerable interface (or to put it simply a collection in which one can go through the collection item by item).

For example you may have a list  of names ("John", "Tom", "June", "Diana") etc.  or  the number of rows in a database table , etc. and they can be queried using LINQ.

Need to query SQL Server with LinqPad, review the following posts:


Tuesday, December 2, 2014

What are the different frameworks you can use with Intel XDK App Designer project?

In the latest version of Intel XDK you can create one of four frameworks to work with. They are,
  • App Framework
  • BootStrap 3
  • jQuery Mobile
  • TopCoat
App Framework
Basically used for mobile devices and supports native OS such as Googl Android, Apple iOS, RIMBlackberry and Microsffot Windows 8. It has no outside dependencies and optimized for speed. It is Javascript library for mobile HTML5 apps.

Bootstrap 3
It is an open source UI library mostly used for web. Although not meant for mobile devices it still works OK. It is heavy on CSS3 and uses jQuery

jQuery Mobile
Uses JQuery and meant for mobile and optimized for touch. Use HTML5 for UI design for rsponsive weeb and apps (smartphone, tablet and desktop).

Pure Open source CSS for clean mobile and web apps. Optimized for performance with no other dependencies. It has its origins in Adobe design.

Thursday, November 27, 2014

Can you access ODATA with PowerShell?

Yes you can. However you need to use PowerShell Version 4.0. On the computer where this post is created PowerShell 4.0 is installed by default (Windows 8.1). But if you are using Windows 7.0 read here:


Here is an example.
I take the example of using the ODATA service provided by ODATA.Org
Here is the URL of this service:

If you were to type this into you browser,you would see this.

This shows meta data of the collection in this service

Launch Windows PowerShell with elevated permissions.

Verify you are using Version 4
PS C:\Windows\system32> $PSversionTable.PSversion
Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1


Declare a $Categories variable as shown
$categories=Invoke-RestMethod http://Services.odata.org/OData/OData.svc/Categories
You will be returned to the next line if there are no errors
Let us see what is in categories
PS C:\Windows\system32> $categories
id       : http://services.odata.org/OData/OData.svc/Categories(0)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content

id       : http://services.odata.org/OData/OData.svc/Categories(1)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content

id       : http://services.odata.org/OData/OData.svc/Categories(2)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content
Looks like there are three categories
Let us look at the titles and link of these categories
PS C:\Windows\system32> $categories.title
type                                                        #text
----                                                        -----
text                                                        Food
text                                                        Beverages
text                                                        Electronics

PS C:\Windows\system32> $categories.link
rel                                     title                                   href
---                                     -----                                   ----
edit                                    Category                                Categories(0)
http://schemas.microsoft.com/ado/200... Products                                Categories(0)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(0)/$links/Products
edit                                    Category                                Categories(1)
http://schemas.microsoft.com/ado/200... Products                                Categories(1)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(1)/$links/Products
edit                                    Category                                Categories(2)
http://schemas.microsoft.com/ado/200... Products                                Categories(2)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(2)/$links/Products

Tuesday, November 25, 2014

What is a Easy Transfer Cable? or do you need to go from XP to Windows 7?

You have already heard that Windows XP support is history. If not, read the following:


After Windows XP came a number of OS Upgrades the most important ones being Windows Vista, Windows 7, Windows 8, Windows 8.1 and soon Windows 10. Of course there were two different architectures as well x32bit and x64bit.

If you had had a Windows XP and migrating to Windows 7 you would need a easy tool. Looks like Windows Easy Transfer was utility made just for this and should be available in Windows 7.

With this utility there were three ways you could transfer stuff between two computers as shown in the opening screen of Windows Easy Transfer (migwiz.exe).

If you were without a network connection you could use the Easy Transfer Cable or create a file on a external HD or a USB Flash drive.

Well what is this Easy Transfer Cable?

It is a USB Male-to-Male connector with an intervening electronic device that allows fast transfer between the connected computers while providing short-circuit protection.

You could buy this cable from a number of vendors such as Belkin (Model FSU258, FSU279),  Dynex (DX-C113231), and many others.

Here is a picture of one of the Belkin cables.
 Here is a listing of transfer support it provides.

Read more here:

Friday, November 21, 2014

How can I install PHP on Windows 8.1?

In order to install PHP on your machine you should have the local web server working which is IIS 8.0 on a Windows 8 OS.  if it is not activated you can activate it from Control Panel (Turn Windows features on or off ).

If the IIS 8.0 is activated you should be able to see the following screen when you access  http://localhost in  browser on your computer.

For the current laptop the following is the response:

Assuming you had no problem activating IIS 8.0 we can move to the next step of installing PHP 5.x.

Downloading and installing PHP 5.X:

PHP can be downloaded (free) using the latest Web Platform Installer (WebPI) which happens to be WebPI version 5.0 from here:


The advantage of using the WebPI is that it not only it installs PHP engine but also configures it to work with IIS.

Downloading and installing is quite easy as shown in the following post:


After installing PHP engine you should test to verify it is working correctly by browsing the info.php file shown next from the following file location:


Here is the simple code listing for info.php:

If your PHP engine is working well you should see the following (only part of a very long page is shown) when you browse this file in your IIS or type the following in the address box of your browser.
This completes the installation of PHP 5.6 on Windows 8.1 Professional that works well with IIS 8.0

In a future post we take a look at accessing SQL Server 2012 from a PHP application.

Related must read article:

I have covered in detail how to use PHP applications (PHP versions 5.2.4 or later) to access data on Microsoft Azure SQL Databases (formerly called  Microsoft SQL Azure) using PHP Data Objects. Details are on pages 369-373, Chapter 10 in my 2010 book here:

You can buy or join the library here:



Wednesday, November 19, 2014

What is DMCA?

DMCA stands for Digital Millennium Copyright Act (it is part of the US Copywrite law) and it criminalizes, "production and dissemination of technology, devices, or services intended to circumvent measures (commonly known as digital rights management or DRM) that control access to copyrighted works".

This United States copywrite law implements two 1996 treaties of World Intellectual Property Organization.

Follow Wikipedia for further details: http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Act.

According to this law you could be penalized and pay penalties for copywrite infringement on the Internet.

DMCA provides protection to online providers such as Google from copywrite infringement liability claims provided, Google and similar providers remove or disable the alleged infringing sites.
You can get more information here for DMCA related information for Google Products:

If you think you are the target of copywrite infringement (Let us say your blog or some picture) you could bring it to the notice of Google or the other provider so that they can take steps to remove.

How effective is this process?

Internet is big and the complexity grows each day and I am not really sure how much protection you can get. I have been the target and you can read about it here  and here.


Monday, November 10, 2014

What is the difference between Windows PowerShell and Windows PowerShell ISE?

Windows PowerShell is not a GUI application and it runs the PowerShell engine in the host program. You will see the following screen displayed when you access Windows PowerShell from the Search charm on Windows 8.1.

If you choose to launch you should search for 'Windows PowerShell ISE. The following screee will be displaced. It is rich interface that has many features including interactive help in scripting. If you are new to Power Shell you should begin your learning with this tool.

You can launch them as administrator which gives you more power (Run as Administrator) and is called launching with elevated permissions.

You can launch multiple instances.

You may be interested in these two posts as well:

Do you know that Here-Strings are?
Find it here:

Monday, November 3, 2014

How do you work with Javascript Object Notation?

With enhancements to JavaScript in recent years and the advent of AJAX, interest in JavaScript took a turn for the better. Early on with AJAX it was recognized that there was a contender for XML for handling data which was stable, faster, and portable. This was the beginning of JSON.

Although RFC 4627 marks a JSON milestone, it appears that it had already been discussed among the JavaScript cognoscenti. JSON is equally, or even more suited, for data exchange than XML, which was originally considered to be the ideal wire friendly format.
What is JSON?
So what is JSON? It’s an acronym you might have started appearing in greater frequency on the Internet. JSON stands for JavaScript Object Notation. Well, it is a special object notational construct and is a subset of JavaScript. It can be used wherever JavaScript can be used and you do not need to download anything. There is no need to worry about the version of JavaScript.
You can read more about JSON in RFC 4627. JSON was designed to be minimal (small), textual, and portable. The MIME Media Type is now registered as application/json. JSON can handle exchanging data in applications written in different programming languages such as C, C#, ColdFusion, Perl, Python, Ruby, and so forth.

JSON Basics
JSON has simple types and two structures which are very similar to the universally used data structures such as dictionary objects, hash values, key/value pairs, lists, sequences, record sets, arrays and so on. It is a natural.

Types in JSON

JSON’s JavaScript subset admits of the following four primitive types.
* strings [except ", and Control Characters]
* number [Integer, real and Floating point]
* Boolean [literals, true and false]
* null

Unlike JavaScript it does not support hexadecimal and octal representation of numbers, nor does it support NaN (not a number) and infinity. Also numbers do not need quotes but strings do.
In addition to the four primitives it also supports two kinds of structures, object and array.

JSON Object
A JSON object is an unordered set (members) of key/value pairs, with keys being separated by values using a colon (:) and the members being separated by a comma (,). The colon and the comma are respectively called the name separator and the value separator.
Here is a variable that represents a JSON object with three members. “company”:”Hodentek” is one member of the JSON object where the key, which is “company,” is separated by the value, which is “Hodentek.” The object is always enclosed between curly brackets as shown in the declared variable. In this example all the values are of type string.

var jObj={"company":"Hodentek", "phone":"609-275-1205", "city":

You can access any member’s value using the dot notation as shown in the next snippet, which shows the “phone” of the object in the alert as “609-275-1205.”


The values of members of the JSON object can be of different types as shown in the following code listing.
Script Language="JavaScript"›

//values are numbers (integer and floating point)
var jobj2={"sunday":1, "tuesday":2.85, "wednesday":3};
document.write("‹b›jobj2.tuesday:‹/b› " + jobj2.tuesday +"‹br›");
//values are of mixed types
var jObj3={"culprit":true, "innocent":false, "notsure":null};
document.write("‹b›jObj3.culprit:‹/b› " + jObj3.culprit +"‹br›");
document.write("‹b›jObj3.innocent:‹/b› " + jObj3.innocent +"‹br›");
document.write("‹b›jObj3.notsure:‹/b› " + jObj3.notsure +"‹br›");


The displayed output when this code is browsed is as shown in the next picture.

JSON Array

Unlike JSON objects, JSON arrays are enclosed between square braces [ ]. The JSON array is an ordered sequence of values separated by a comma (,). The values can be any of the primitive types as well as the two structures, JSON objects and JSON arrays. Here is a JSON array variable with four string values.

var myJsonArray=["Red", "Blue", "Yellow", "Magenta"];

You will be able to access an array item from its position (0 based) as shown in the following listing.

var myJsonArray=["Red", "Blue", "Yellow", "Magenta"];
for (i=0; i‹4; i++){
document.write("‹b›myJsonArray["+i+"]‹/b›="+ myJsonArray[i]+"‹br›");

The displayed output when this script is executed is as shown in the next picture.

It is possible to have an array  whose elements are of different types. Array items can be objects and arrays as well, as shown in the next listing.
//Array with different types
myJA2=["red", 1, null, true];
document.write("‹;b›myJA2:‹;/b›  " + myJA2[2]);
//Nested array
myJA3=["red",1,["a", "b", "c"], false];
document.write("‹;b›myJA3[2][1]:‹;/b›  " + myJA3[2][1]);
//Object in an array
myJA4=["red", {"Yes":"Yes, you do", "No":"No, you do not"}, 2];
document.write("‹;b›myJA4[1].Yes: ‹;/b›"+ myJA4[1].Yes);

The displayed output when this script is executed is as shown in the next picture.

Notice how the inner array and the object inside the array are  accessed.
JSON is minimal textual representation of data as compared to the “verbose” XML, which makes equivalent XML much larger than JSON. Well, both are textual, but JSON is more so than XML with all its “angularities.” This is not to put down XML but just to highlight the obvious. This has obvious implications for AJAX, and more often JSON is the preferred data format in which AJAX results are received.
Everything in XML is a string but JSON has types as discussed earlier. JSON equivalent of XML In my previous tutorials, XML Islands and XML Responses and AJAX, the file webstudents.xml was used for illustration.

The same file will be represented as a JSON object in this section. The file is reproduced here for reference. In writing down the equivalence only the root element and its children are considered. Here is the listing of webstudents.xml.
‹!--My students who took web programming class with me--›
‹student id="1"›
‹name›Linda Jones‹/name›
‹legacySkill› Access, VB5.0‹/legacySkill›
‹student id="2"›
‹name›Adam Davidson‹/name;
‹legacySkill›Cobol, MainFrame‹/legacySkill›
‹student id="3"›
‹name›;Charles Boyer‹/name›
‹legacySkill›HTML, Photoshop‹/legacySkill›
‹student id="4"›
‹name›Charles Mann‹/name›
‹legacySkill›Cobol, MainFrame‹;/legacySkill›

The rules in this conversion are simple. The root element will be the main object, and the three student nodes will form an array. Each array element will be a student object with its own attributes as a string value pair. If you keep the following syntax  in your cross-hairs it will be easy to follow the listing.

Object: var obj={key1:value1, key2:value2 ,key3:value3};
Array: var Arr=[valueA, valueB, valueC];

The XML document has both simple and complex types and this is developed piecewise to make the explanation easy to understand.

Root element with students and their attributes

The root element is the object with the three students arranged in an array. Each of the students is an object as shown in the next listing.

var justStudents={"wclass":[
This is an object whose value is an array. The wclass[1] refers to the second student object and is accessed as shown in the alert statement. This code will display an alert window with value 2. In the above code the children of the students are not included.
Root element with student’s children

The next listing shows the JSON object with only the children of students shown in an array.

var webclass ={
{"name":"Linda Jones", "legacySkill":"Access, VB 5.0"}},
{"name":"Adam Davidson", "legacySkill":"Cobol, MainFrame"}},
{"name":"Charles Boyer", "legacySkill":"HTML, XML"}}

Here student 2 is “Charles Boyer” and his legacyskill is displayed in the alert box. Combining the two, it is easy to see how the JSON equivalent of webstudents.xml can be fashioned as shown in the next listing.
var studentAll={"wclass":[
{"student":{"id":"1"},"name":"Linda Jones",

"legacySkill":"Access, VB 5.0"},
{"student":{"id":"2"},"name":"Adam Davidson",

"legacySkill":"Cobol, MainFrame"},
{"student":{"id":"3"},"name":"Charles Boyer",

"legacySkill":"HTML, XML"}
document.write("‹b›Id of 3rd student: ‹/b›" + studentAll.wclass[2].

document.write("‹b›name of 2nd student:‹/b› " + studentAll.wclass[1].

document.write("‹b›legacySkill of 1st student:‹/b› " + studentAll.


The listing also shows how the various values are accessed. The displayed output when this script is executed is as shown in the next picture.

Notice how the student attributes are accessed.

What about binary object representation?

There is no native support for binary objects. However some new formats have appeared recently.
Read here and here. However their universal adoption will take time.


JavaScript Object Notation (RFC 4627) is introduced with examples of its types, objects and structures in this post. JSON is well suited for data interchange. JSON is stable because it has no versions; needs no validation; and is not extensible, all very likable characteristics which may make it a long time player in JavaScript.

However, since JSON is a subset of JavaScript, it has to conform to the same naming conventions regarding the use of language specific keywords and other rules. Also, its usefulness in AJAX calls is obvious because JSON is as easy for humans as it is for machines, and a lot simpler and more understandable. he fact that it is easy for machines makes it an obvious for the Internet of Things where communication with machines takes center stage.

In the simple example of webstudents.xml, the number of characters for XML amounted to 413, whereas when formatted in JSON it required 243, a substantial difference. Accessing values is also a lot simpler than going through the ECMA object model climbing up and down the XML tree.

Unmodified version of the post appeared here:

Friday, October 24, 2014

How to developer-unlock a Windows Phone 8.1 Preview and deploy an app?

You are a Windows Phone 8.1 Preview developer and you have created a nice app that you want to
test on a phone you own.

How do  you test it?

While developing the application using Visual Studio 2013 Express for Windows Update 3 (this is a
free developer resource, read more here) you will see it on a emulator, the phone image that emulates your actual phone  that comes on your PC/Laptop when you run the app. After running the app on your laptop you should deploy it to your phone. The phone you buy is by default locked and you need to unlock it.

Details of unlocking the phone are here:
Go to this link:

This is how I was able to do.
  • I connected my phone (Nokia Icon) to the laptop.
  • On my Windows 8.1 Professional (x64 bit) laptop I searched for Windows Phone and got these results(few shown)

  • I clicked on the Windows Phone Developer Registration. I do have a developer license attached to my Windows LiveID (you shold have one too).

The following screen opened up. Notice the last line in this screen referring to the status. The phone I am using is identified.

I clicked on Register

The phone gets registered and the status shows it is unlocked now.

I can now deploy the app to the device. If deployment is successful I will be able to see the app on my app list in the phone.

I have to take care of the following before I deploy.
Make sure the phone is connected to the PC/laptop on which you developed the application.
Build the app for ARM architecture (you should find it immediately below the menu item Store on your Visual Studio 2013 IDE, see next image) and make sure the phone is working and is not locked.


Thursday, October 23, 2014

How do I take a screenshot of a display on my Windows Phone 8.1?

This is easy but a little tricky but you do get a signal when you capture an image.
I am using Nokia Icon using Windows Phone 8.1 Preview.

Also you may not have a folder called Screenshots in your Photo where it is supposed to get saved. But as soon as you add your first screen shot, a folder Screenshots will be created where your first screen shot is stored. You do not need an app to do this.

How do you capture?

With the display showing your image, hold and press both Volume Up(hardware) and Start (hardware) buttons together. This is the tricky part because the Start (hardware start) button when pressed turns your display dark and I could do it only 30% of the times. But it does work.

Here is a screenshot I took today:


Wednesday, October 22, 2014

What is LumiaSensorCore?

Microsoft introduced Lumia SensorCoreSDK at Build 2014. It enables memory-efficent tracking of motion and location information. It is ideally suited to building health and fitness tracking activities using the 4 apis.

It is supported on several of Nokia phones using Windows Phone 8.1 OS. The early beta is now an offial release SDK version 1.0 since Octobe 14.

If you are a developer you should access this site to learn more:
It is already built into Bing app for Health and Fitness app from Windows Store.


Friday, October 17, 2014

What is DISM (Deployment Image Servicing and Management)?

DISM is short for Deployment Image Servicing and Management. It can be used in new deployments as well as repairing the local image (the OS on the laptop or desktop). It is a very useful tool to know.

It works on many Windows platforms:
  • Windows 8
  • Windows 81
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows 7
  • Windows Server 2008 R2
Also review this link for Windows 7 related information:

Good news is it is installed with Windows 8.1 and is found here typically:

If you search for it you may find it in several folders.
These are listed in my Windows 8.1 Professional (x64).

How do you use it?
It is a command line tool and you need to bring up command processor with administrative privileges
(Run As Administrator) also know as elevated mode. If you are unable to run cmd.exe in elevated mode like it happenned to me follow this link for the procedure to run in elevated mode.
Now type dism /? after the C:\ prompt. You get the help file as shown and you get to display the file
details and its usage.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>dism /?
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

DISM.exe [dism_options] {Imaging_command} []
DISM.exe {/Image: | /Online} [dism_options]
         {servicing_command} []

  DISM enumerates, installs, uninstalls, configures, and updates features
  and packages in Windows images. The commands that are available depend
  on the image being serviced and whether the image is offline or running.

  /Get-MountedImageInfo   - Displays information about mounted WIM and VHD
  /Get-ImageInfo          - Displays information about images in a WIM or VHD
  /Commit-Image           - Saves changes to a mounted WIM or VHD image.
  /Unmount-Image          - Unmounts a mounted WIM or VHD image.
  /Mount-Image            - Mounts an image from a WIM or VHD file.
  /Remount-Image          - Recovers an orphaned image mount directory.
  /Cleanup-Mountpoints    - Deletes resources associated with corrupted
                            mounted images.

  /Capture-CustomImage    - Captures customizations into a delta WIM file on a
                            WIMBoot system. Captured directories include all
                            subfolders and data.
  /Get-WIMBootEntry       - Displays WIMBoot configuration entries for the speci
fied disk volume.
  /Update-WIMBootEntry    - Updates WIMBoot configuration entry for the specifie
d disk volume.
  /List-Image             - Displays a list of the files and folders in a
                            specified image.
  /Delete-Image           - Deletes the specified volume image from a WIM file
                            that has multiple volume images.
  /Split-Image            - Splits an existing .wim file into multiple
                            read-only split WIM (SWM) files.
  /Export-Image           - Exports a copy of the specified image to another
  /Append-Image           - Adds another image to a WIM file.
  /Capture-Image          - Captures an image of a drive into a new WIM file.
                            Captured directories include all subfolders and
  /Apply-Image            - Applies an image.
  /Get-MountedWimInfo     - Displays information about mounted WIM images.
  /Get-WimInfo            - Displays information about images in a WIM file.
  /Commit-Wim             - Saves changes to a mounted WIM image.
  /Unmount-Wim            - Unmounts a mounted WIM image.
  /Mount-Wim              - Mounts an image from a WIM file.
  /Remount-Wim            - Recovers an orphaned WIM mount directory.
  /Cleanup-Wim            - Deletes resources associated with mounted WIM
                            images that are corrupted.

  /Online                 - Targets the running operating system.
  /Image                  - Specifies the path to the root directory of an
                            offline Windows image.

  /English                - Displays command line output in English.
  /Format                 - Specifies the report output format.
  /WinDir                 - Specifies the path to the Windows directory.
  /SysDriveDir            - Specifies the path to the system-loader file named
  /LogPath                - Specifies the logfile path.
  /LogLevel               - Specifies the output level shown in the log (1-4).
  /NoRestart              - Suppresses automatic reboots and reboot prompts.
  /Quiet                  - Suppresses all output except for error messages.
  /ScratchDir             - Specifies the path to a scratch directory.

For more information about these DISM options and their arguments, specify an
option immediately before /?.

    DISM.exe /Mount-Wim /?
    DISM.exe /ScratchDir /?
    DISM.exe /Image:C:\test\offline /?
    DISM.exe /Online /?

You can get more information as shown in the examples above.

If some of your files are corrupted and causing problems you can use this tool to see which of them are corrupted and also heal them using uncorrupted versions.


How to run command processor in elevated mode?

Normally it should be very easy. Search for cmd in the search charm. In the drop-down menu right click 'Command Prompt' and from the drop-down menu click 'Run as administrator'.

If that does not start cmd.exe in elevated mode you may follow the next procedure. Due to some bugs the elevated mode does not start this way.
Click Cntrl+Alt+Del to bring up the Task Manager screen as shown:

Click File | Run new Task (by default the cmd is chosen)
The Create new task window is displayed with cmd as the task as shown.

Place check mark for 'Create this task with administrtive privileges'
The command processor in the elevated mode is displayed. Now you can carry out all thingss that need elevated mode.

Wednesday, October 15, 2014

How do you create a compressed file in Windows 8.1?

Normally (as in Windows 7 or Windows XP) it should be real easy requring just a right click on the file you want to save as a compressed file.

It is (sometimes) not that easy in Windows 8.1. The reason being the right click produces a dud if there is something wrong. Did I say a bug? or corrupted file? Nothing happens, as in my case. The CMD.exe cannot be run in adminstrative mode since the same thing happens as a with a right click.

What do you do now?

As any sane person would do, trash your laptop/desktop/tablet/phone/xxx or Microsoft. I am kidding.

The solution I found is the following:
You need to read the next two posts to prepare yourself:

Having read the above open you folder which contains the file or folder you want to compress as shown:
Now you can see you can create a zip file. Click on New Item to create a zip file.


Tuesday, October 14, 2014

How do you open File Explorer in Windows 8.1?

In Windows 8.1 (Professional in this case but should be the same in other versions) what used to be Start in Windows 7 has been replaced by the Windows logo which takes you to the Metro mode of Windows 8.1.

If you right click the logo you bring up a pop-up menu as shown.

If you click the File Explorer (no matter click, right click or left click), nothing happens, the desktop display is refreshed.

How do you open the File Explorer?

Open the Search charm and type in File Explorer. The File Explorer appears in the Search as shown.

Right click the File Explorer click Pin to Taskbar in the pop-menu shown here.

Now a folder icon is added to the Taskbar as shown.

Now right click the folder icon (File Explorer) to display the pop-up menu from which you can access the folders.

A related question is in the following link:


What is SQL Server PowerShell provider and how do you use it?

SQL Server PowerShell provider enables you easily and interactively look at all objects much like you look at all the objects in a folder/file system.  You can use the command line to traverse paths in a SQL Server.

The server objects available as folders when you use Windows Power Shell are:
SQL Policy
SQL Registration
Data Collection
SQL Server Integration Services
SQL Server Analysis Services

In order to acces objects on SQL Server you need to run SQLPS.exe which you find in the following directory:
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules>dir
 Volume in drive C is TI10672700E
 Volume Serial Number is 16FB-D230

 Directory of C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\M

07/06/2014  06:33 PM              .
07/06/2014  06:33 PM              ..
07/06/2014  06:37 PM              SQLASCMDLETS
07/06/2014  06:40 PM              SQLPS
               0 File(s)              0 bytes
               4 Dir(s)  880,764,026,880 bytes free

When you run SQLPS by double-clicking the file you spawn a new scripting shell 

Microsoft SQL Server PowerShell
Version 11.0.2100.60
Microsoft Corp. All rights reserved.

which you can use with SQL Server as shown:
In this shell you can access the previously mentioned SQL Objects much like you would acces folders/files using you DOS commands as shown here.
PS SQLSERVER:\> cd SQLRegistration
PS SQLSERVER:\SQLRegistration> cd..
PS SQLSERVER:\> cd Utility

How do we access the Server databases?
In order to do this you have to know the SQL Server Instance(s) and then the objects can be accessed as shown here:
Get the instance name:


PS SQLSERVER:\SQL\LocalHost> dir
Instance Name
Let us say we want all the objects on the AdventureWorks 2012 database on this instance.
You can find them as shown here:
PS SQLSERVER:\SQL\LocalHost\RegencyPark\Databases\AdventureWorks2012>

That's all for now.


Accessing PowerShell in SSMS go here:

How do you access folder / file properties in Windows 8.1?

In earlier versions of Windows you would right click a file or a folder to access the properties via the drop-down menu.

But in Windows 8.1 (in my case Windows 8.1 Professional 64bit), a right click would just refresh the Windows Desktop and nothing happens). I believe this is not how it should be and here is a way to look at the folder / file properties.

In Windows 8.1 open the File Explorer as shown.

Click open the folder for which you want to review the properties. In this case Desktop for example.
The Window for Desktop opens with its own ribbon as shown.

Choose the folder or file (mysorian in this case) and access its properties via the Properties toolbar item.

It was so easy in earlier versions. I wish the earlier way of access is restored.


Tuesday, September 23, 2014

Does iPad Air support multi-user logins?

Having mulit-users for a tablet/iPad type devices is a good feature to have. Of course you can sell more iPads if only one user is targetted, but is it prudent? Not if you want your minor to have his own. It is best if he/she can share with an adult who can oversee if some mischief is going to take place.

Also there is the question of economics? single earner families with more than one child for example.

iPad Air does not allow you to share the iPad with another user. Another user can use but the identity will be that of yours. This has caused some embarassments in sending out wrong information when the iPad was used by two with the profile of a single user.

Only Android and Windows OS has the capability of mainatining multiple users and their profiles. Galaxy Note Pro 12.2 (using Android OS); Nokia and Toshiba tablets that use Windows OS support multiple users.

There are some apps for iPad that can create multiple users. But this is only for certain mail applications etc. It cannot be truly called Multiple-user support.

Also read here:
More scenarios for multi-users from here, http://www.citeworld.com/article/2114769/tablets/tablets-supporting-
"When you're talking about a tablet, that strict single-user assumption breaks down (Apple's unspoken message appears to be that everyone should have their own iOS device). Many families share one (or more) tablet(s) among some, if not all, family members. In education settings, multiple students may share a tablet during a single class or the same tablets may be used by different students in each class session. In business, teams may share a pool of tablets
that each user can check one out as needed for meetings or presentations - a technique that can be used in a wide range of professions such as as sales, marketing, healthcare, teaching or training, law enforcement and field support. Even when tablets aren't explicitly shared, students or workers may need to let someone else use a tablet to add content, review work or browse information."

How do you lock a TSA approved suitcase-lock on Delsey Helium Shadow 2?

I recently bought a Delsey Helium Shadow 2 suitcase which came with a E-181 lock which can
be set by a user but can be opened by Transportation Security Administration staff without
damaging the  lock or the suitcase.

I add another picture to Delsey's own documentation as it does not tell you any details about part B
on its instruction sheet in the next picture. I had to call them at 1-877-333-0126 to find out the details.

The Parts B shown in the above  are the two zipper ends (shown below) that you should align just below the lock as shown in the next image. Lift the tags and push in slots in the lock.


Sunday, September 21, 2014

How to join a Windows tablet to the HomeGroup?

I recently bought a Toshiba Encore 2 WT10 A tablet (OS: Windows 8.1) by trading in my iPad which had several problems one of which was the network connection was falling off too often and emails
remained unread till my next stop at Apple Store.

Toshiba's tablet is quite nice, the cameras are not that great but lots of peripherals like external memory, USB etc.. Anyway, I have Nokia Icon which takes superb pictures and I have whole suit of Nokia Camera related apps that fixes up most photos I take.

Joining the HomeGroup

I wanted the tablet to join the HomeGroup which was already present on my Toshiba Satelite 570 Series laptop with its own default password. I think each device comes with it own default HomeGroup password which you can 'leave' to 'join' another.

All I needed to do was to start tapping Settings -> Change PC Settings -> Network -> and HomeGroup in that order. Then the HomeGroup details gets displayed as shown.

You should click the 'Leave' button on the tablet and copy and paste the password from the Homegroup on your laptop (or PC) in its place and click 'Join' on your tablet.

Now the tablet has joined the laptop's HomeGroup. You can also enable other options as to what can be shared on this HomeGroup page. However, you have to select one at a time since it takes a while for the share to be enabled.

Wednesday, August 27, 2014

If you have multiple versions of Power Shell how do you change from one to the other?

If you have two or more versions of Power Shell on your computer it is possible to choose the one you want to run.

By default the highest version may be one that runs as in the present case on Windows 8.1 Professional (version 4.0 is installed in Windows 8.1 by default and Version 3.0 in Windows 8).
As described in the previous post, version 2.0 is also present.

You can run the version you want by the following command:
PS C:\>Powershell -version

This is how you run the version you want.
Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.
The next command displays the version number
PS C:\Users\Jayaram> $PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

The following changes the version to 2.0. Note that there is no response.
PS C:\Users\Jayaram> PowerShell -version 2.0
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

The following displays the version after change
PS C:\Users\Jayaram> $PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

PS C:\Users\Jayaram>

How do you install NuGet Package Manager?

NuGet is the package manager for Microsoft development platform including Microsoft .NET. NuGet gallery at nuget.org is the central package repository.

NuGet Package Manager is available for the following clients:
  • For Visual Studio 2010, 2012 and 2013 through Visual Studio Extension Gallery that you can access from Tools|Extensions and Upgrades... in Visual Studio IDE.
  • For WebMatrix 3 in the WebMatrix Extension
  • Command-line: http://nuget.org/nuget.exe
This is how you access in Visual Studio 2013 Express for Windows.

How do you manage packages? Read here for details:

How do you install Json.Net from NuGet Packet Manager?
Read here:

Sunday, August 24, 2014

What is SQLDiag?

SQLDIAG is an utility that provide general purpose diagnostics (collection).
It can be run as console application or as a service. It is available
in all versions starting from SQL Server 2005 to SQL Server 2014.
SQLDIAG collects the following types of information:

•Windows Event Logs (Application, System, and Security) in .CSV files

•System Monitor (aka Perfmon) performance counters in .BLG file/s

•SQL Server Profiler traces in .TRC file/s

•SQL Server Blocking chains in a _BLK.TRC file

•SQL Server error logs, configuration, point-in-time snapshots of several DMVs in
a .OUT file

•System information via the Msinfo32 utility in a .TXT file

You can customize the utility by editing (manually)  the XML configuration file
of the utility, SQLDiag.xml

There is also a GUI tool which you can use to visually edit the xml file at the
codeplex site here.

File location on your computer:
If you have installed SQL Server in the present post SQL Server 2012 it should be
installed in the same directory as SQL Server which is usually,
%ProgramFiles%\Microsoft SQL Server\110\Tools\Binn

Tuesday, August 19, 2014

Can multiple versions of PowerShell exist on a computer?

Power Shell is one of the most powerful scripting languages to use if are working with Windows. Often you may want to know what version you have on your computer and you may also want to know whether multiple versions can exist side-by-side on a computer.

I purchased a Windows 8.0 laptop and a few days later it was upgraded to Windows 8.1. There have been many Windows Updates since I bought the computer and I am not sure if a version of PowerShell was installed. Also a few months later I installed SQL Server 2012 Developer Edition.
After looking through I discovered that I have two versions 2.0 and 4.0; and they can exist side-by-side.

In my previous post here, I mentioned that you can find the version of your PowerShell installation using the following commandlet.

PS C:\>$PSVersionTable.psversion

As you can see from this post that I had PowerShell Version 3.0 on my Windows 7 (x64) machine


In Windows 8.1 using the same commandlet I find the following:
Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Users\Jayaram> $psversionTable.psversion
Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

However when invoked PS from SQL Server as mentioned in this post:

I see that the version is 2.0
Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

This means that the versions 2.0 and 4.0 can exist side-by-side

May be you are interested in these as well:

Wednesday, August 6, 2014

Can you use Powershell to find the environmental variable Path?

It is very easy to find path using the command line as shown:

If you want to use Power Shell then you should first start PowerShell with the following command:

If powershell is installed you should see the following change:
C:\> changes  to PS C:\>

When you are in PS C:\

type exactly as shown.
PS C:\> get-item env:
Then you should see all the environmental variables (directories) separated by a semi-colon;
A sample listing is shown here:

If you want to get a single environmental variable such as 'Path' for example
You can do this:
PS C:\> $x="Path"PS C:\> get-item env:$x
PS C:\> get-item env:"Path"
On this machine Windows 7 (x64) Ultimate, "Path", 'path', path all returned the 'PATH' variable.

If you want to know the version of your powershell, try this:

Have a look at this reference for PATH:

Sunday, August 3, 2014

What is 'Path' in Windows 7 and how do you find it?

What is 'Path'?
Path is an environmental variable.

It is a list of directory paths where the computer looks for a command to execute although the full path to the executable is not given.

For example ,

if you type 'Notepad' at a command prompt a Notepad application opens immediately, although its location on your computer is at:
%windir%\system32\notepad.exe which is the same as C:\windows\system32\notepad.exe.

This is because C:\windows\system32\ is in the list of directories in the path.

How do you find the 'Path'?
You can simply type path at a command prompt and the computer prints to the screen the list of directories as shown:
PATH=C:\Program Files (x86)\iis express\PHP\v5.4;C:\Program Files\Internet Explorer;;C:\oraclexe\app\oracle\product\11.2.0\se
rver\bin;;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program File
s\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft
 SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Insta
ller\;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\SQL Anywhere 16\bin64;C:\Program File
s\SQL Anywhere 16\bin32;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110
\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft Visu
al Studio 10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;;C:\Windows\System32\
WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Java\jre7\bin\;

You can also find it another way using the Computer Properties as shown here: