#75288 - 2003-06-04 04:06 PM
Creating shortcut with WshShortCut()
|
Raceeend
Starting to like KiXtart
Registered: 2002-05-09
Posts: 129
Loc: The Netherlands
|
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
|
|
Top
|
|
|
|
#75290 - 2003-06-04 04:20 PM
Re: Creating shortcut with WshShortCut()
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
yes
$Path = "%userprofile%\desktop\Baan V.lnk" $TargetPath = "\\SR0004\Worktop\bin\Worktop_client.exe" $args = "\\SR0004\Worktop\documents\$BaanUsername.wtd" $StartDir = "\\SR0004\Worktop\bin" $IconPath = "\\SR0004\worktop\bin\worktop.exe"
$x = WshShortCut($Path,$TargetPath,$args,$StartDir, $IconPath)
|
|
Top
|
|
|
|
#75291 - 2003-06-04 04:31 PM
Re: Creating shortcut with WshShortCut()
|
Raceeend
Starting to like KiXtart
Registered: 2002-05-09
Posts: 129
Loc: The Netherlands
|
Thank you!!!!!!!!!!
_________________________
regards,
Martijn
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 409 anonymous users online.
|
|
|