Skip to content

Instantly share code, notes, and snippets.

@0mg
Created August 29, 2010 14:27
Show Gist options
  • Select an option

  • Save 0mg/556334 to your computer and use it in GitHub Desktop.

Select an option

Save 0mg/556334 to your computer and use it in GitHub Desktop.
if (WScript.arguments.length &&
WScript.arguments(0).split(".").pop() === "lnk") {
var wsh = WScript.createObject("WScript.Shell");
var lnk = wsh.createShortcut(WScript.Arguments(0));
wsh.Run('explorer /select, "' + lnk.targetpath + '"');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment