Lonkero,

I've tried the code and it stops at:
if not vartype($Shortcut) exit 4

When debugging (/D) the script loops a few times at: if $item.islink ... next and then jumps to the line above (if not vartype($Shortcut) exit 4).

I called the function as follows:
Link("\\s300-100\software$","g:\","TESTLINK...","e:\ff\testlink")