Hello,

I'm trying to create a shortcut with WshShortCut() but from the targetpath some characters get mixed up.

code:
		$Path = "%userprofile%\desktop\Baan V.lnk"
$TargetPath = "\\SR0004\Worktop\bin\Worktop_client.exe \\SR0004\Worktop\documents\$BaanUsername.wtd"
;? "TargetPath = " + $TargetPath
$StartDir = "\\SR0004\Worktop\bin"
$IconPath = "\\SR0004\worktop\bin\worktop.exe"

$x = WshShortCut($Path,$TargetPath,,$StartDir, $IconPath)

the result is:
TargetPath must be --> \\SR0004\Worktop\bin\Worktop_client.exe \\SR0004\Worktop\documents\giex001.wtd
Targetpath gets --> \\Sr0004\Worktop\bin\Worktop_client.exe \SR0004\Worktop\documents\giex001.wtd

Anyone an idea?
_________________________
regards, Martijn