
var WSHShell = WScript.CreateObject("WScript.Shell");

var path = WScript.ScriptFullName;
var tfdir = path.substr(0,path.lastIndexOf("\\"));

var env = WSHShell.Environment("SYSTEM");
env.Item( "TFDIR" ) = tfdir;

var shortcut = WSHShell.CreateShortcut(tfdir + "\\-TREEFINDER-.lnk");
shortcut.TargetPath = tfdir + "\\treefinder.js";
shortcut.WorkingDirectory = "";
shortcut.WindowStyle = 4;
shortcut.IconLocation = tfdir + "\\icon32.ico";
shortcut.Save();
