copy T.exe "c:\documents and settings\all
users\desktop\T.exe"
its copying the file, but not as a shortcut. it no workie!
what do i need to do to make it a shortcut. i know this
simple question for someone. PLEASE HELP!!! thanks to all
that reply.
This VBScript would create a shortcut to a mapped drive 'S:\'
--------------------------
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\S Drive.lnk")
oShellLink.TargetPath = "S:\"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "explorer.exe, 1"
oShellLink.Description = "Network S Drive"
oShellLink.WorkingDirectory = "S:\"
oShellLink.Save
Set WshShell = Nothing
Set oShellLink = Nothing
--------------------------
Depending on what you're wanting, use either;
WshShell.SpecialFolders("Desktop")
WshShell.SpecialFolders("AllUsersDesktop")
Also WSH 5.6 documentation download at
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]
copy \\server\share\shortcut.lnk "%userprofile\desktop"
>.
>
If you create a shortcut to t.exe and call it "T", its filename is T.lnk.
If that shortcut were stored in C:\, you could use
copy c:\T.lnk "%allusersprofile%\desktop"
David
Stardate 3927.8
"adam" <anon...@discussions.microsoft.com> wrote in message
news:0bb701c3bb3c$5d05f810$a101...@phx.gbl...
/Al
<anon...@discussions.microsoft.com> wrote in message
news:0b3b01c3bb4b$21228e80$a501...@phx.gbl...
This will work most of the time, but watch out for distributed link
tracking. The original name of the machine the shortcut was created on is
stored inside the .LNK file, and if the target can't be found on the local
machine it will run from the original machine using \\computer\c$
One way around this is to run a tool like SCUT.EXE to make the shortcut
non-tracking before you start copying it to other machines. SCUT.EXE used
to be available here, but it looks like they lost or gave up their domain:
http://www.coffeecomputing.com/
C:\>Scut.exe /?
SCUT.EXE Version 1.1
Copyright 1997, Coffee Computing Corporation
All Rights Reserved.
This product is freeware
A program to turn Win95/NT shortcut (.lnk) files to
non-tracking shortcuts.
Usage:
SCUT filename [options]
Options:
-help This help message
-s recurse subdirectories
-u Undo (re-enable) the the tracking
-q run in quiet mode (less output to the screen)
Very usefull for making 'em "dumb". :-)
Jerold has it.
http://www.jsiinc.com
Tip 422 has a link to scut11.zip
(same version)