why can’t we copy path of target from .lnk shortcut. I tried with following script doesnt work. If we look at the shortcut properties it shows the path just wont let copy it.

CreateShortcut Method

var WshShell = new ActiveXObject("WScript.Shell");
strDesktop = WshShell.SpecialFolders("Desktop");
var oShellLink = WshShell.CreateShortcut("C:\Documents and Settings\user1\Desktop\to haven.lnk");

sysinternals strings came to rescue.

C:\> strings "C:\Documents and Settings\user1\Desktop\to haven.lnk"

prints the target path.

Shell Links


XA two phase commit protocol

The XA two phase commit protocol works as follows:

The XA transaction coordinator (WebSphere) calls all the Resource Managers (RMs) in the transaction and tells them to Prepare to commit. Typically at this point they write the updates and create logs to enable backout, while locking the newly committed data.

Any RM can abort the transaction, in which case the TM tells everyone to roll back.

Once all participants agree to commit, the TM then tells all the RMs to commit (phase 2). At this point all the logs are cleaned up and locks are removed.

If the server crashes in the middle of this process there may be uncomitted transactions in various logs (WebSphere and the resource managers – databases, queueing systems etc). If you delete the tranlog you may leave data in an inconsistent state, and you may leave a database with locks held against rows that were being modified by the transaction that was inflight. This can be dangerous. Normally bringing up all the RMs and then restarting WAS will cause a normal recovery to occur. There are some cases where it is not automatically clear what needs to be done, and an admin may need to explicity go into the database and force a transaction to go away. You may see this in-doubt situation called “heuristic damage”.